Quantcast
Channel: Market Calls
Viewing all articles
Browse latest Browse all 2070

Absolute Monthly and Yearly Profit/Loss Table – Amibroker AFL Code

$
0
0

While designing strategies at our workplace one of our colleague asked “is it possible to get a Month on Month Profit/Loss table in Absolute value rather than in compounded percentage terms?”

while back-testing, by default Amibroker provides Profit Table in Compounded percentage terms. However the profit table can be customized according to ones requirement. Rather than doing a month on month back testing and recording the returns manually one can simply custom design the Profit Table to automate his requirement.

Amibroker stores the Profit Table Computation in 3.Profit Table under /formulas/reports folder. One can simply understand and tweak the afl to match his requirement.

Here is the simple AFL we built which brings Absolute Absolute Monthly and Yearly Profit/Loss Table. Values are scaled in thousands to remove excessive numbers from the profit table. so a 8.3 value needs to be interpreted as Rs8300/-

However one can change the parameter divider = 1000; in line number 3 to bring his own scale.

Steps to Install Profit Table

1)Download 4.Absolute Profit Table (in Thousands).zip

2)Unzip and copy the file 4.Absolute Profit Table (in Thousands).afl to the folder /amibroker/formulas/reports/

3)Now Run Backtest.

4)Go and check the Backtest reports where you will get Absolute Monthly and Yearly Profit/Loss Table as addon to your existing backtest report.

Related Readings and Observations

The post Absolute Monthly and Yearly Profit/Loss Table – Amibroker AFL Code appeared first on Marketcalls.


Viewing all articles
Browse latest Browse all 2070

Trending Articles