Skip to content
Prev 14096 / 15274 Next

Need help with replication of a strategy using 'Quantstrat' & 'IKTrading' packages

Dear All,

I am trying to replicate core strategy (for a single instrument) from the
book 'Following the trend' by Andreas Clenow. Details about the strategy
are in the picture in this link
(*https://drive.google.com/file/d/0B5GQskyO5V5SVU1SdTFhY2txWEk/view?usp=sharing
<https://drive.google.com/file/d/0B5GQskyO5V5SVU1SdTFhY2txWEk/view?usp=sharing>*).
I was able to add entry indicators, signals & rules, but need help with the
exit part (6th & 7th bullet points in the picture). Also, I am not able to
update the portfolio, hence cannot plot performance charts. I would be very
grateful for your help if you could look into the code attached and help me
resolve this issue.