Custom backtest code to find P/L of every script in portfolio for every year (say 2016-2017) in single portfolio backtest

Hi All !
does any one have/help custom backtest code to find profit/loss of every scrip in portfolio for every year ( say 2016-2017) in single Portfolio backtest?

example=>

scrip year profit/loss
AA 201 6 4500
BB 2016 5000
CC 2016 3600
AA 2017 5200
BB 2017 5500
CC 2017 4500

Rgds

http://www.amibroker.com/kb/2014/10/13/per-symbol-profitloss-in-a-portfolio-backtest/

1 Like

Dear Dionysios, thanks for your reply. I have visited your mentioned linked months back. But, that shows total pnl for each symbol for a particular year or combined pnl for a range of year say 2016 and 2017. I am looking for CBT, when we run back test from 1jan 2016 to 31 Dec 2017 simultaneously,then for each symbol pnl result are shown year wise. Rgds

http://www.amibroker.com/kb/2014/12/05/how-to-backtest-symbols-individually/

1 Like