PNL tracing through a moving avg

Hi,

Would be lovely to understand - is there any built-in mechanism to track the PNL bar by bar for a symbol / basket of symbols, and have a second PNL / set of orders based on how good the first PNL goes ... say for example, to apply a moving average on the first PNL line and be "on" or "off" on the second pnl?

thanks

I guess you are asking about backtest, correct?

If so, yes there is a way to track PNL on bar by bar basis.

There are two ways to approach this:

  1. By accessing equity value of previous backtest - the equity represents bar by bar cumulated PNL of positions open during the backtest. You can access equity of previous backtest usign Foreign call, calculate averages on it and create new system that uses that info to enter trades.

  2. Using custom backtester
    Custom backtester allows you to watch open positions and get their PNL on the fly (during backtest in progress) Inside custom backtester you can calcualte moving average and place new orders, see Porfolio Backtester Interface Reference

Indeed, for backtesting. Amazing, thanks! if there are any examples already somewhere (or on using Foreign calls), would welcome a link - I know this idea is not new, but do not know the terminology industry uses for it (PNL based trading doesn't sound right at all)

This is usually called Equity feedback

You might look at this for some general information

3 Likes

Makes sense what Matt Radtke is describing in there ... though just a concept & no code shared, will try to reach out to Matt to find out more.

Any idea on what happened with him, he's not done anything on his website for almost 4 years (no reply from him so far either)

He is active on this forum.

@andj You can contact me through the form on my website or at matt@quantforhire.com.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.