Actual PIP Cost for backtesting

Posted By: kerplunk1899

Actual PIP Cost for backtesting - 09/26/18 21:34

Hi to all the community,

I have a question about the variable PIPCost and values it should assume during the backtests.
Quoting the manual:

"This value should normally remain constant during the simulation for not adding artifacts to the strategy performance figures; but if desired for special purposes, it can be calculated by script to fluctuate with the exchange rate"

Can you explain me why?
Can you please also write me the right formula I should apply to this indicator in order to simulate the actual PIPCost value on each run?

Thank you so much and regards,
Luca
Posted By: jcl

Re: Actual PIP Cost for backtesting - 10/02/18 07:54

Fluctuations are caused when your account currency is different to the counter currency. The exchange rate then determines the pipcost. It is normally not recommended to have variable pipcost in a strategy test, but if you still want it, a function for this is in the manual under "PIPCost".
Posted By: tradingest

Re: Actual PIP Cost for backtesting - 10/02/18 10:00

Originally Posted By: jcl
It is normally not recommended to have variable pipcost in a strategy test, but if you still want it, a function for this is in the manual under "PIPCost".


Why is not reccomended?

For a backtest from 2010 to 2018 on EURUSD for example the pipCost change too much in the perdio considered.
With PipCost equal within backtest period is not right. Are you agree with me?
Posted By: jcl

Re: Actual PIP Cost for backtesting - 10/02/18 10:09

No. You normally do a backtest not for measuring the effect of the EUR/USD rate on your account, but for measuring the expected future performance of a strategy.

Of course, if you for some reason don't want to know the strategy performance, but your account growth in the past, adapting pipcost can make sense. In that case you must also adapt spread, rollover, and margin cost to their historical values.
Posted By: tradingest

Re: Actual PIP Cost for backtesting - 10/02/18 11:57

Originally Posted By: jcl
No. You normally do a backtest not for measuring the effect of the EUR/USD rate on your account, but for measuring the expected future performance of a strategy.

Of course, if you for some reason don't want to know the strategy performance, but your account growth in the past, adapting pipcost can make sense. In that case you must also adapt spread, rollover, and margin cost to their historical values.


What if my strategy uses the Tradeprofit function? This one is based on amount and not pips. In this case it would make sense to have a real pipCost. Right?

Does it exist any function like TradeProfit that works with pips?

Thanks
Posted By: jcl

Re: Actual PIP Cost for backtesting - 10/02/18 14:23

Tradepips = TradeProfit/TradeUnits/PIP.

http://manual.zorro-project.com/trade.htm
Posted By: tradingest

Re: Actual PIP Cost for backtesting - 10/02/18 20:10

Thanks jcl the thread is more interesting.
For example, the code below the annual profit on EURUSD asset is 1.6% +290.4p. What is the performance referred to by not having an initial capital?
+290.4 What are they related to? What do they indicate?
Code:
// Trend Trading ///////////////////
#include <profile.c>

function run()
{
	vars Price = series(price());
	vars Trend = series(LowPass(Price,500));
	
	Stop = 4*ATR(100);
	
	vars MMI_Raw = series(MMI(Price,300));
	vars MMI_Smooth = series(LowPass(MMI_Raw,500));
	
	if(falling(MMI_Smooth)) {
		if(valley(Trend))
			enterLong();
		else if(peak(Trend))
			enterShort();
	}
	
	StartDate = 2010;
	EndDate = 2018; // fixed simulation period 2009-2014
	
	set(LOGFILE); // log all trades
	PlotWidth = 800;
	PlotHeight1 = 300;
	ColorUp = ColorDn = ColorWin = ColorLoss = 0;
	ColorDD = BLACK;
	ColorEquity = GREY;
	//plot("MMI_Raw",MMI_Raw,NEW,GREY);
	//plot("MMI_Smooth",MMI_Smooth,0,BLACK);
	//plotTradeProfile(-50); 
}

Posted By: firecrest

Re: Actual PIP Cost for backtesting - 10/05/18 02:39

Hit should be $290 earn
Posted By: tradingest

Re: Actual PIP Cost for backtesting - 10/05/18 05:43

Originally Posted By: firecrest
Hit should be $290 earn


but without to set capital the % is related to?
Posted By: jcl

Re: Actual PIP Cost for backtesting - 10/05/18 14:53

The percentage is the ratio of profit to margin and drawdown. Look in the manual under Performance, all the numbers are explained there.
Posted By: tradingest

Re: Actual PIP Cost for backtesting - 10/14/18 14:36

jcl,


in this case I work with pips and not PipCost.
In this way how referring this values

The file testtrades.csv generated under Log folder has the column "Profit". This value is calculated with PipCost present in the AssetFix?

Thanks
© 2024 lite-C Forums