Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

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

46 sec read

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.

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

[Webinar] Understanding and Mitigating Curve Fitting in System Trading

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...
Rajandran R
1 min read

P-Signal Strategy Long Only Strategy – Amibroker AFL Code

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...
Rajandran R
2 min read

7 Replies to “Absolute Monthly and Yearly Profit/Loss Table – Amibroker AFL…”

  1. Hi Rajandran, is there a way in which stocks can be scanned and ranked in terms of their absolutely monthly return %. Like rankng stocks with Max return in a selected timeperiod.

  2. Hi Rajandran
    I have been trying to run backtest for EURUSD in Amibroker to  compounds profit when account doubles but dont know where to start and which settings to use…For example , we are trading a $10,000 account with 1lot and the account doubles to $20,000 .So now we will trade 2lots in the $20,000 account and when $20,000 doubles to $40,000 we will trade 4lots and so on in that order.. So anytime we double the account , we increase the lot size by 2 ..How can I run this kind of backtest in Amibroker?Can anyone point me in the right direction please..I am quite sure this will help a lot of traders make more profit backtesting and trading their system since compounding profits in my opinion is what can grow an account exponentially when done right…I will be very glad if someone can point me in thee right direction.Thank you and green pips to you.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More