StrategyQuant crash...
 

[Sticky] StrategyQuant crash course 2019  

Page 1 / 2
  RSS

coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
25/01/2019 9:04 am  

### StrategyQuant crash course 2019 ###

A short introduction to algo-trading.

 

This 48h crash course is designed with only one goal in mind: to show you how to generate trading strategies using StrategyQuant platform. Everything here will be presented in a step-by-step manner. Most of you will probably not understand every single step described below, however maybe this short demonstration will inspire you to learn more and you will stay with us for longer than 48h ūüėČ There is no membership fee, almost everything is free here, (Note: StrategyQuant demo works for 14 days, read more here), all you need to do is to learn and to contribute by generating, testing and sharing strategies.

In this example we will concentrate on EURUSD symbol and H1 TimeFrame and we will target a 'standard broker' with UTC+2 (Day Time Savings and no weekend data). If you will follow all steps below, you should be able to see your first strategies in the next few hours. Let's start!

 

TABLE OF CONTENTS

STEP 1: SQ installation

STEP 2: SQ configuration

STEP 3: Tick data download and configuration

STEP 4: Workflow configuration

STEP 5: Strategy generation and filtering

 

Note: Follow the actions indicated by yellow boxes and arrows.

 

STEP 1: StrategyQuant installation.

1A: Go to StrategyQuant website and download a demo version of StrategyQuant click HERE.

1B: Enter your name and a valid email address.
1C: Go to you inbox and click on 'confirm the subscription'. (Check your spam folder)
1D: Download the latest version of StrategyQuant to your PC.
1E: Install StrategyQuant software on your PC. It can take a while...
1F: Go to you inbox and click write down a License Code you have received. (Check your spam folder)
 
See STEP 2 below...
This topic was modified 10 months ago 28 times by coensio

Quote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
25/01/2019 10:06 am  

STEP 2: StrategyQuant configuration.

2A: Start the StrategyQuant program and enter your demo License Code (see step 1F).

2B: If you get a Windows firewall warning then select "Allow access"
2C: Start your PC speed benchmark, after benchmark has finished hit on "close".
See STEP 3 below...
This post was modified 10 months ago 7 times by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
25/01/2019 10:31 am  

STEP 3: StrategyQuant tick data configuration.

 

3A: Go to "Data manager", and click on "Dukascopy Data->Add new Ducaskopy data symbol".

3B: Select EURUSD and add a postfix named "_TICK_DUKA", hit save.

3C: Select EURUSD_TICK_DUKA and click on "Dukascopy Data->Download data for existing symbol".

 
3D: Select time range "2003.5.5 to 2019.1.25". Select Data Type: "Tick data", and hit "Start download". (This step can take few hours until tick data download has been completed!)
3E: Now select this symbol and click on "Clone to timezone", set cloned data symbol name to "EURUSD_TICK_DUKA_P2DSTNW". Choose UTC+02 shift and enable "Remove weekends" option. (This is for all brokers with time shift of GMT+2h ='P2', with day time saving ='DST' and no tick data on weekends ='NW')
3F: Now repeat steps 3A to 3E including "Clone to timezone", for GBPUSD symbol, and set cloned data symbol name to "GBPUSD_TICK_DUKA_P2DSTNW". Choose UTC+02 time shift and enable "Remove weekends" option.
See STEP 4 below...
This post was modified 10 months ago 21 times by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
25/01/2019 6:43 pm  

STEP 4: Custom project / work flow configuration

 

4A: At first close the StrategyQuant program.

4B: Click on the link below and save this file on your PC.

CoensioWorkFlow EURUSD H1 V1S.zip (50 strategies for slow PC's)

CoensioWorkFlow EURUSD H1 V1.zip (1000 strategies for fast PC's)

 

WARNING: If you have a slow computer/laptop, please use V01S (small) version of this package, containing only 50 strategies. It will save you hours of time, since some of tests in the workflow take >1min/strategy of computing time!

 

4C: Open your projects directory, for example in my case it is: "C:\StrategyQuantX\user\projects\", and unzip the CoensioWorkFlow EURUSD H1 V1.zip file in here. Check the directory structure and check if this directory contains 'databanks' and 'project.cfx' items.

4D: Now start your StrategyQuant and you should see [Task(13)] near CoensioWorkFlow EURUSD H1 V1.

4E: You can click on [Task(13)]  to see the internal workflow. As you can see there are already 900 strategies in it (I already generated those for you). See the databank in the lower part of the screen.
 
4F: In this workflow you need to have at least 1000 strategies in the databank in order to go to the next test (1 OSS1 test). Note that in this example you need to generate 100 additional strategies (since 900+100=1000). After the 1000 is reached the workflow will automatically proceed with the next step '1 OSS1 test' in the flow (no manual intervention needed). To increase your chances, and depending on your computer speed, you can increase the total number of strategies in 'Settings->Ranking' option window.
Note: strategy generation is time consuming, on my 8 core, I7 3,2GHz machine it takes several hours to generate 1000 strategies. Keep this in mind, I usually wait few days until I have at least 2500 strategies in my databank before going to the next step in the workflow.
 
 
You are ready to go! See STEP 5 below...
This post was modified 10 months ago 44 times by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
26/01/2019 10:50 am  

STEP 5: Strategy generation and filtering

 

In this step will will run our complete workflow. Note that strategy generation (first work flow block) and all validation tests (thereafter) are very time consuming. A good practice is to close all other applications on your PC and let it run until the workflow is finished. Note that the workflow is configured to remove all strategies that do not pass specified PASS filters/conditions at each workflow step. After strategy generation you will have >1000 strategies in the databank. This number will decrease systematically after each new workflow validation step.

WARNING: If you have a slow computer/laptop, please use V01S (small) version of this package from step 4B above, containing only 50 strategies. It will save you hours of time, since some of tests in the workflow take >1min/strategy of computing time! Resulting in many computation hours, depending on your computer speed.

 

The workflow consists of the following steps:

 

0 Strategy generation step: in this step strategies are generated. At least 1000 needed to proceed to the next step.
1 OOS1: This test will run all strategies on an Out-Of-Sample period (5 years of data 2005 to 2010)
2 Slippage at 3: Test at higher slippage of 3pips.
3 GBPUSD market: Test on a different market.
4a TF_M30: Test on a lower TimeFrame.
4b TF_H4: Test on a higher TimeFrame.
5 MC random trades: Monte-Carlo randomized trades test.
6 MC skipping trades: Monte-Carlo random skipping of trades test.
7 MC random parameters: Monte-Carlo randomized strategy parameters test.
8 MC random volatility ATR: Monte-Carlo randomized market volatility test.
9 MC random slippage:  Monte-Carlo randomized slippage test.
10 MC random spread:  Monte-Carlo randomized spread test.
11 Last OOS2 test
: Final test using 1 year 'unseen' market data.  This test simulates forward-test results.
12 Strategy Selection 
13 Portfolio correlation test {out of the scope, only for advanced users}
14 WFM optimization {out of the scope, only for advanced users}
15 Forward trading {out of the scope, only for advanced users}

 

5A: Hit Start button and wait,wait,wait and wait....and finally we will process all required steps.

5B: Now we can analyze each of the resulting strategies, the goal here is to find strategies with highest Return to DrawDown ratio (Ret/DD) and a nice profit stability in both IS (in sample) and OOS (out of sample) periods. Note that not all strategies will look nice..that's the reality. In the end only few from many thousands strategies will be ready for live trading.

5C: The other interesting statistics can be found on 'Trade analysis' tab. Ideally we are looking for strategies that are profitable in most of the previous years.

This post was modified 10 months ago 17 times by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
26/01/2019 10:50 am  

Conclusion: In this short demonstration you have seen how trading strategies can be generated and validated for stability. Now you should have an idea how the algo-trading process looks like. However this short demo does not cover all remaining points like: further filtering and testing using Walk-Forward optimization method or portfolio building and real account testing. If you join our team on this forum and start generating your own strategies, I know for sure you will gradually learn all required skills. If you want to do practice, you can go back to step 4F, change the amount of strategies you want to generate and run the whole workflow again. In the end we believe, that with some determination and tools like StrategyQuant everybody can learn how to generate stable strategies. Note that this forum is still a very 'fresh' project, we will improve our workflows, share more strategies and we will present more live-trading results in the coming weeks.

 

If you have any questions just reply to this post, we will do our best to answer you as soon as possible.

 

Greets

Chris

This post was modified 10 months ago 3 times by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
26/01/2019 10:50 am  

############ READ THIS ############

If you like this approach to algo-trading and want to learn more about how to generate great strategies, please support my free project and join our private-collaboration. Read more here:

StrategyQuant collaboration

Greets

Chris

This post was modified 4 months ago by coensio

ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
26/01/2019 10:50 am  

Reserved by Coensio.


ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
26/01/2019 6:33 pm  

Reserved by Coensio.


ReplyQuote
jpygbp
(@jpygbp)
New Member
Joined: 6 months ago
Posts: 2
18/06/2019 11:47 pm  

Questions:

After the workflow, how do we see the Monte Carlo graph of robustness like in your examples? 

Is this workflow the final version that you mentioned could work from start to finish producing complete results?

What additional testing do you recommend?

You mentioned that you start with about 2500 systems.  I noticed that the filtering reduces the possible usable systems to just a few and sometimes zero.  I only had 100 on one run and 1000 on another to start with.

Thanks,

 


ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
19/06/2019 8:03 am  

* After a MC test is done you can double click on strategy and go to Monte Carlo results tab. Note that strategy remembers only the results from tha latest MC test, so if you want to see previous tests you need to repeat them or add additional databanks that will store the results from each single MC step.

* This workflow is just an example, yes it contains most common robustness tests, and in theory should produce robust strategies. How robust? I honestly do not know...time will tell the best thing we can do right now is to generate multiple strategies on multiple markets select the best ones and additionally do some WFM testing and incubate them for at least a year... to see the results on a demo/live accounts. Note that SQX is just few months old, there is no or very little live account data so at this moment in time no one can tell if this fully automated approach works long term or not...so we need to be a little bit careful...One other important thing, the game plan here is months or maybe even years...since most of strategies will be long term systems.

Note: Personally I updated (tweaked) this workflow many times to meet my own targets like high Ret/DD (=low DD) and high SQN number.

* Yes this workflow will eliminate the weak strategies and only few of them will 'survive'...but in the end we want only the most robust strategies to trade with. We can also turn it all around and do the following: if we think that we have a strategy that seems to be profitable, we can try to disprove this by trying to break our strategy using every single test that we can imagine...

 

I hope this makes sense.   

 

 

 

 

 


ReplyQuote
Gianfranco
(@gianfranco)
Eminent Member Customer
Joined: 8 months ago
Posts: 21
19/06/2019 3:00 pm  

hi from Gianfranco my little work  in picture…..not big work in reality...little account   one portfolio from 20 05 2019....only eurusd  with   15min and h1  MODEST RESULT (MINUS 4 %)  but is MY FIRST...my computer work  h24  for built multy symbols portfolio..i would to bring my contribution to strategies with your workflow… i think you are more experienced  than  i have been 3 months only

but 20 years manual trading

MY STRATEGIES COME IN TOO LATE…..THEY COME OUT TOO SOON   ….

thanks Gianfranco


ReplyQuote
Gianfranco
(@gianfranco)
Eminent Member Customer
Joined: 8 months ago
Posts: 21
19/06/2019 3:05 pm  

I haven 't  news filter   because in one day i loose 250 pips for bad news


ReplyQuote
coensio
(@coensio)
Member Admin
Joined: 11 months ago
Posts: 175
19/06/2019 3:25 pm  

It's quite normal to see drawdown directly after launching portfolio, but only if it does not exceed the maximum historical drawdown... as observed during backtest (or maybe even MC test). What most traders forget is that almost all portfolios will be 80% of the time in drawdown and only 20% of time making new heights (just look at your backtests). My 6 strategy portfolio is currently also in DD...I'm fine with that since the game plan here is months/years, we just need to wait to see the real results over time.

W.r.t news I have a solution for this problem, contact me on my email....

One other thing, did you check the correlation between live results and backtested results for each strategy?

 

This post was modified 5 months ago by coensio

ReplyQuote
Gianfranco
(@gianfranco)
Eminent Member Customer
Joined: 8 months ago
Posts: 21
20/06/2019 8:44 am  

Hi,,,,max dd in back test is   180 usd  about   18,2%...correlation is about the same in live results….little difference 

i tried your workflow..yestarday..but there are a lot of blocks  (all) in strategy renerator….with my computer i can generate about   140.000/150.000 an hour….i would like to try using less blocks to speed up….

thanks 

Gianfranco……...weather forecasts italy next days over 40/42 degrees…..


ReplyQuote
Page 1 / 2
Share:

Please Login or Register