What is Quantitative Trading?
What it is vs What it's Not
What it's Not
- Magically knowing where the market is going to go.
- Magically finding patterns in the market.
- Magically improving profits while reducing risk.
- Magically generate the trading signal for you.
- Doing the market analysis for you
What it is
- Using past data (and more) in the hopes that the same patterns that happen within the past data will happen again in the future.
- Note: We don't know where the market is going to go, we just hope the same patterns happen again. Just need to find those patterns.
- We have to construct our own hypothesis about patterns, and then falsify if those hypothesis are incorrect by using quant methods. (i.e. statistics, mostly)
- Note: You can actually use statistics paired with data mining, but this is frowned upon because of multiple comparisons bias (which will be your arch nemesis in quant trading)
- Quantifying the risk you are going to take, and balancing it with profit target that you want to achieve. Higher profit targets necessarily means more risk.
- Trading signals are based on a trading strategy that you designed and optimized, not a black-box learned strategy.
- Note: a lot of quants are iffy about using ML because overfitting and black box nature (overfitting will be your other arch nemesis).
- Since you have to make your own hypothesis, you have to know how to analyze markets in the first place.
Takeaway
Main takeaway: You can't use Quantitative Trading by itself to make money. You need to understand how to analyze markets first, then use Quantitative Trading to assist you in finding statistical-provably good strategies.
Main Goal: To find a trading strategy that you think is good enough to trade with.
What Makes a Good Trading Strategy
Wait, What is a Trading Strategy?
Trading Strategy: Some method that translates some data to a set of buy and sell choices in the market.
e.g. you might use bollinger bands on price data to set when you buy and when you sell. Or you might use stock fundamentals and stop losses to know when to buy and sell.
Criteria
The criteria for a good trading strategy are:
- Has been backtested on a large enough distirbution to make the metrics statistically significant (e.g. on long enough time, or tested on multiple financial instruments)
- Achieves good metrics
- Avoiding the biases within testing and development. (most specifically backtesting, data prep, and optimization)
- Does good on paper trade, and actual trade.
As a general rule, you wont' be 100% sure of any strategy's real performance unless you actually trade it on real data. Backtesting is useful to filter out obviously bad strategies.
Main Metrics
% Returns
- Price change in percentage. Can be calculated over whatever period we want (daily, annual, etc.)
Cumulative Returns
- Cumulated returns over certain period (usually monthly or annually).
- e.g. if in 2 days you get 5% returns each, then cumulative returns is 10.25%.
Volatility
- Standard deviation from the mean of prices.
- Is the main notion of "Risk"
Sharpe Ratio
- Risk adjusted returns (or, returns/volatility)
- Usually the mainly used metric, because investors usually seek the highest amount of returns for the lowest amount of risk. Very useful for leverage if you are into that thing.
Drawdown and Drawdown Length
- The maximum % that the capital decreases over the testing period.
- Length is how long the capital stays underwater.
Strategy Skew
- The skew of the strategy. Divided into two:
- Negative Skew: produce more consistent positive returns but with occasionally drastic downside.
- Positive Skew: produce consistently small losses, but with occasionally big upside
Biases
Overfitting
- Strategy is too complex, so it only works on historical data and not out of sample data.
- Happens if you use historical data for testing multiple times. That is, if you've already seen and used the data for testing, then you optimize your strategy based on that test data, you are already overfitting.
- Also happens if you optimize too much on a specific kind of data.
Multiple Comparisons Bias
- We only use the best statistical test, and ignoring all the others which performed worse.
- Happens quite a lot if you do data mining. Basically the more strategy you test, the higher the chances are that "winning strategies" found are actually winning because of random chance.
Regime Shifts
- Change in the financial world, which makes older strategies not work as well. (e.g. financial crises).
Overcrowding (or Alpha Decay)
- Certain strategies are overused by the market
- Since not (yet) lots of people use quantitative or systematic trading strat in Indonesia, a good opportunity to tap into it
Survivorship Bias
- Data does not consist of bankrupted companies. It should contain them.
Look-Ahead Bias
- Data consist of information that we won’t know in the past. (e.g. index rebalance).
Representativeness Bias
- Tendency to interfere and stop the algorithm because psychological tendencies.
Is it For You?
Do you want to verify that your strategy performs well statistically?
Do you want to know whether there are any correlations between an instrument's price and some other data?
Do you want to know how to mathematically optimize the tradeoff between risk and profit?
Are you comfortable letting your strategy run by itself, automatically?
If you answer yes to the questions, then this is for you!
Resources
Basic Resources to Start With