I keep reading sentences along the lines of 'setting the right parameters is what makes an algorithm profitable and is one of the more difficult skills to master'. But what exactly is meant by a parameter in algorithmic trading? Please would you provide a basic example? Why is setting good parameters considered 'an art'?
I would argue that algorithmic trading, as well as many other AI /machine learning endeavours are basically about applying some statistical technique or model to a problem and trying to optimise. In doing this, i.e. when you formulate or design your model you often have a lot of choice.
The starting point is often about deciding upon some model characteristics, and a very common division is to choose a parametric model or non-parametric model.
Lets say you wanted to build a model that predicts a person's height given his weight (mass), and you have the real weight and height data of 100 people, and only the weights of 10 other people whose height you want to predict.
You have many choices here but a parametric model would be to assume that the height and weights followed a bivariate normal distribution with parameters being means and covariance matrix. You can use your data of 100 people to derive these most likely parameters. Then given the weights you can estimate/predict the heights of the people using your calibrated probability distribution.
On the other hand, you could use a non-parametric model, one that doesn't need any parameters for a probability distribution. You might choose to use an algorithm with a rule that says, find the nearest neighbour. In this model, for each weight you look up the closest weight value in your known dataset and assign that respective height as the predicted height.
Now, here enters another term hyper parameter. In the case of the non-parametric model above you have chosen to use a nearest neighbour algorithm, but who is to say it is not better to take the average of the two closest neighbours or three?? This hyper parameter (which is slightly different from the previous parameters influenced by the data) is a kind of setting of your algorithm.
This toy example is very small and in reality you might have many parameters available to tune that you simply cannot know for sure which are the best, and therefore the art is really the experience of knowing what has worked well in the past and having a good hunch as to why that was the case.
The limited amount of context makes this difficult to address, but in the context of machine learning and its applications to quantitative finance, the answer @Attack68 provided is very informative: https://quant.stackexchange.com/a/42705/33410
Remember: a trading algorithm is no different from what the word means in the context of computer science. It is a set of instructions meant to do something. Trading algorithms make decisions based on the data it has access to and what the recipe says. A parameter is just something you add to
- Prevent something from happening.
- Ensuring that something happens.
- Limiting the extent to which something happens.
However (and again; adding some more contextual details would be beneficial) it may be something much simpler than that, and most things that come to mind initially are tugging at risk management concepts / practices.
Parameters are implemented as methods of risk management (e.g., defining portfolio allocation percentages for individually traded assets). As a rudimentary example, let's say that you want to define a parameter for the amount of of securities your trading algorithm is allowed to own at any given time (measured as a percentage of the total liquid value of all the securities currently owned plus available cash) to ensure that one signal from your alpha model is not able to take over your entire portfolio and in the case that the signal in question was bad, that your portfolio still exists! This is fairly trivial to implement.
Maybe you want to set parameters for what and where you want your trading algorithm to operate. There are many examples that come to mind.
Why is setting good parameters considered 'an art'?
Well, it isn't. The aforementioned tasks are very empirical; in fact the first and main one entails nothing more than simple arithmetic!
As far as the "is quant finance an art or a science" deal goes, I'd recommend reading Laurent Bernut's answer to Is stock picking more art or science? on Quora.
I have oscillated between art and science to finally realise it is neither. It’s a game
The way you approach things conditions your thinking. If you think it is an art, You will marvel at the masterpiece but fail to appreciate the hard work behind it. If You think it is a science, you will come up with a definitive formula, but will be fooled by randomness. If You see it as a game, then you will play as long as you can stay in the game.