## Optimization

#### Backtest

- = IS = In Sample Data
- Stage 1: 2015-2018, Stage 2: 2016-2019, ...
- Use 4 stages with each different years for each stage (more stages mean less trades per stage and therefore less significance)
- In order to reach 90% confidence in Power Analyses you will need (source)
- 500 trades for a system with 20% edge
- 2.200 trades for a system with 10% edge
- 8.000 trades for a system with 5% edge

#### Walk Forward Analyses (WFA)

- = OOS = Out Of Sample Data
- Stage 1: 2019-2019, Stage 2: 2020-2020, ...
- Ratio of IS to OOS 4:1

#### Parameter optimization

- Max number of parameters 3, to ensure not to overfit
- Use e.g. 10,20,...100 instead of 1, 2, 3, ...100

#### Monte-Carlo Test/Robustness

#### Rate your Strategy

Ordered by correlation from Backtest to WFA by using Pearson (source)
*0.701* CAGR/Max Drawdown
- CAGR = Compound Annual Growth Rate
- ((Equity final / Equity start) ^ (365/d)) -1
- Quite similar to Recovery Factor and Calmar Ratio
- Scales with position size

*0.704* Recovery Factor
- Ratio of gained profit to maximum drawdown

*0.722* Sharpe Ratio
- Ratio of the arithmetical mean profit for the position holding time to the standard deviation from it

*0.728* Expected Payoff
- Avergage profit per trade

*0.729* Coefficient of Correlation, R, Pearson Correlation Coefficient, Linear Regression Model
- Measure distance from perfect line (Linear) to equity curve
- Return values between -1, +1
- Deviation: Coefficient of Determinatiopn, R² (is just a square of above, return values between 0 and +1)
- Needs fixed position size, in order to compare with a linear line

*0.736* Standard Profit Factor (sum of profits/sum of losses)
- Scales with position size

*0.745* Normalized Profit Factor (sum of profits/sum of losses)
- Needs fixed position size, so all trades got equal influence

*0.745* CAGR/Mean Drawdown
- Store drawdown of every candle in an array and find the average
- Scales with position size

- RINA Index
- RINA Index = (Net Profit – Net Profit in Outliers)/(Average Drawdown*Percent Time in the Market)
- Return values over 200 are good

- Kelly Criterion