## StrategyQuant X Workflow

#### Goal = 3 strategies per market

- Make sure goal can adhere number of simultaneous trades of your broker
- 1 Fuzzy strategy on 1H
- 1 Random strategy on 4H
- 1 Fuzzy strategy on 1D
- 1 Classic trend following strategy on 1D

#### Build - STAGE 0

- What to build
- StopLoss: required | 20-100 Pips | ATR 0.5-2
- ProfitTarget: not required | 20-160 Pips | ATR 1-3
- SL/PT ranges: M30 15-100 pips | H1 30-200 pips | H4+ 50-300 pips | Gold 600-3000 pips
- Data
- Only test until 31.12.2019, remaining data is for second OOS Test (Trump/Corona Test)
- ~5-6 years (not too much, last years are more important hence markets are not stationary)
- IS 70%, 30% OOS
- Building Blocks
- Pullback (rare, high WR, needs high SL, psychological demanding)
- Breakout (Stop-Order, WR ~40%, usually trend following, therefor PT not require, but trailing)
- Chop/Mean Reversion (sideway expecting to bounce from certain level, prefered Limit-Orders, only for markets that are currently MR)
- Trend follower (higher timeframe only 4H+)
- Fuzzy Logic/Biased (55%-95% of 3-6 conditions have to be fullfilled)
- Money management
- Initial capital: 10.000
- Fixed size: no, with SL by ATR, each trade will have different trade size in money
- Risk fixed %: no, equity curve will not be normalized
- Fixed amount: 100$ per trade flat per 10K capital
- Cross check
- Higher backtest precision (Net profit of precision-test >= 80% of orig. Net profit)
- Monte Carlo trades manipulation (300 sims | randomize trade orders | full sample | resampling)
- Ranking
- Weighted fitness: 2 * Ret/DD | 1 * Ulcer Performance Index
- Automatic filter: no trades | too many ambiguous trades | add warnings
- Custom filters: # of trades >= 80 | Winning Percent >= 35% | SQN >= 1.3 | Ret/DD Ratio(OOS) >= 1.3 | Stability(OOS) >= 0.6

(dont go too strict, give genetic evolution a chance) - Filter out stats with correlation > 0.8 Profit/Loss by Week (Allow negative correlation)

#### Retest - STAGE 1

- Data
- Slippage: in average 1 is enough for Forex, but you can retest with 3 to make sure. Allways according to markets (as example Gold is 100+.).
- Turn off Ranking custom filters, wont work anyways unless you define the correct retested input data.
- Monte Carlo trades manipulation (test for random market timings/occurences)
- 1 tests with 1000 sims | full sample | resampling
- Filter Max DD % (@ 95% confidence) <= 15%
- Filter Ret/DD ratio (@ 95% confidence) >= 20% Ret/DD ratio
- Filter Ret/DD ratio (@ 95% confidence) >= 1.5
- Filter Stability (@ 95% confidence) >= 0.55
- Higher backtest precision
- Net profit of precision-test >= 80% of orig. Net profit
- Monte Carlo retest 1 (test for overfitting)
- 1 tests with 350 sims | full sample
- Randomize strategy params: prob. 20% | change 25% | symetric
- Filter Max DD % (@ 95% confidence) <= 14%
- Filter Ret/DD ratio (@ 95% confidence) >= 40% Ret/DD ratio
- Filter Ret/DD ratio (@ 95% confidence) >= 2.5
- Filter manually by watching out for a) stagnating equity curves b) strats that differ a lot from orig (delete the curve fitted)
- Monte Carlo retest 2 (test for broker, price peaks)
- 3 tests with 350 sims | full sample | selected TF only
- Randomize history data: prob. 30% | change 12%
- Slippage 0-3 (~1 x spread of symbol) | Spread 2-5 (~1.5 x spread of symbol)
- Filter same as MC above
- Trump Tweets/Corona test
- Test 1.1.2019 until today
- Filter Profit factor >= 1.3
- SPP / Overfitting test
- Sys. Param Permutation | 2000 sims
- Filter % of Profitable Optimizations > 85
- Filter Ret/DD Ratio(median) >= 66% Ret/DD Ratio
- Filter Ret/DD Ratio(median) >= 3
- Filter Max DD % Ratio(median) <= 15%
- Walk-Forward Matrix (usually skip, only when too many strats pass all other)
- 5000 tests | Simulated IS, Exact OOS | Percent, Floating
- OOS 10-35 Step 5
- Runs 5-20 Step 5
- Filter recommended conditions

#### Improve manually - STAGE 2

- Retest on MT4/MT5 (or whatever your trading platform is)
- Exclude none trading days (dont open on friday?)
- Fuzzy Logic: try higher # of conditions that have to be fullfilled

#### Improve exit - STAGE 3

- Load strategies from Stage2 into Builder "Improve existing strategy"
- Choose only the exists, everything else is same as in builder
- Weighted fitness: 2* Ret/DD | 1* Max DD %
- Repeat all retests from Stage 1

#### Improve all parameters - STAGE 4 (high risk of overfitting)

- Load passed strategies from Retester STAGE 3 into Optimzer
- Simple Optimization | Max 20.000 | Recommended parameter | Opt. also trading options
- Value distri. up/down 32 | Steps 8
- Repeat all retests? Not necessary, results will be overfitted. But yeah sure, go test, allways!

#### Combined portfolio - STAGE 5

- Filter correlated assets
- How? Todo
- ? RSquared of Asset 1 Diff vs Asset 2 Diff
- Filter similar algos - in SQX
- Run the strats without any robustness test, but with 1min precision
- Sort by Ret/DD Ratio, eyeball equity curves, remove those that that are too equal to another strat
- Click all, create Portfolio; check equity curves of portfolio parts; how many do they visually overlap?
- Correlation by Monthly (on daily trades), Weekly (on 4h trades), Daily (on 1h trades) | Correlation of Profit/Loss | Allow negative correlation
- Check pseudo-code, if there are really different
- Filter similar algos - in QuantAnalyzer
- Select all in "Portfolio Master"
- Brute force
- Number of strategies in portfolio = min 2, max 2 (if all are breakout strats)
- Rank by Return / Drawdown ratio
- Correlation Settings = 0.3 Profit/Loss per Day
- Allow negative correlation
- Data range = recent lookback
- Choose a combined strategy and click "Analyze" button, check overlapping equity curves (source)

#### Enjoy da Pips - LIVE

- Avoid over-leveraging (too many trades in same direction of one symbol)
- Risk reduction with "escape rules"
- Economic News
- Price Shock