Hello all,
I am experimenting with portfolio backtester.
I have some symbols that are newer and some that are older. If a symbol isn't trader yet but I have it in the backtester and use its close value in a calculation then I assume it will fubar with a division by zero or something.
I came from Thinkscript on ToS. When I have a variable that is "Not a Number" for part of the calculation then I can scrub that data by saying
def variable1 = close("ticker")
def clean_variable1 = if isnan(variable1) then clean_varibale1 = 1 else clean_variable1 = variable1;
is this type of coding applicable in Powerlanguage?
thanks
long term portfolio backtesting with many symbols
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: long term portfolio backtesting with many symbols
Hello joebone,
If there is no data for a symbol yet, then that won't be possible to run any code over it in your Portfolio.
If there is no data for a symbol yet, then that won't be possible to run any code over it in your Portfolio.