Closed jainraje closed 8 months ago
Hi @jainraje,
Apologies for the delay in responding to this issue!
Yes, I'll certainly be adding more realistic examples of proper trading strategies into the /examples folder in subsequent releases. I previously had a Moving Average Crossover style strategy on a single instrument in the previous version.
I'll utilise the approach you describe above. One interesting issue is determining the weights for each symbol. This can either be done statically, that is, irrespective of the 'strength' of the crossover, or the weights themselves can be dynamically generated based on the current distance between the two moving averages. Both are valid approaches.
I'll leave this Issue open until a suitable example has been added.
Kind regards,
Mike.
HI Mike,
Very good to see you are starting to think about adding the multi instrument as an example. I like the idea to build in flexibility such that the weights can dynamically be generated. The weights could be dynamic based on economic macro conditions or conditions specific to the instrument being traded or other.
Can the new version of qstrader be used "as is" to back test a single instrument MA crossover similar as was done with the old qstrader or is a update to qstrader required?
Thanks for your message.
Kind regards, --Rajeev
Can a example be provided how to run a simple single sma cross strategy for several symbols?
Example:
if price cross above sma long position is initiated else if price is below sma short position is initiated.
should be done to include several symbols (ideally 3-5).
add different weighing to each symbol
Very good see work on this new version being done.
TIA. --Rajeev