indirect way to use percent-based indicators on BAC data?

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

indirect way to use percent-based indicators on BAC data?

Post by yoyo2000 » Mon Sep 21, 2009 10:49 pm

From the algorithm,ony point-based indicators could be used directly on the back-adjusted continuous data,this bring much discommodiousness,is there any indirect way to use percent-based or absolute-price-level-based indicators on this kind of data?

For the judgement of "if price go above 5% of last close",i could calculate this 5% increment on raw data,and add it on last close of BAC data.
but i have no ideas about how to make RSI,for example used on BAC data.
Much appreciation for any help.

regards.

Adrian77
Full Member
Full Member
Posts: 12
Joined: Mon Nov 19, 2007 7:19 pm
Location: Sydney

Post by Adrian77 » Thu Oct 08, 2009 3:05 am

Not sure exactly what you are trying to achieve with the reference to the percentage moves, but why not use a move in ATR terms instead?

I'm probably stating the obvious, but the problem with using a percentage of price is that 5% for one contract might be a huge move, while 5% might be noise for another contract...I would rather try to make any references to price relevant to the underlying contract in question by measuring movements in ATR terms - thereby allowing trading rules to be similarly effective across many different contracts and (hopefully) resulting in a system which remains robust across many markets and over time as the volatility of the instruments change (a fixed percent of price reference probably can't achieve this).

yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

Post by yoyo2000 » Mon Nov 30, 2009 12:02 am

Adrian77,sorry to reply so late.
ATR is a great tech,but in some situation,percent move is better,for example,a 200 points move when the price is 1200 may be a huge move,but a it's only a minor step when the price is 4000.
So it maybe better when applying both atr and percent move together,and select the bigger when caculating the position size or other risk-relating indicator.

further more,many percent-based indicators can't be used on the back-adjusted data,it's very pitty and a big limit,it would be great if there is a in-direct way to use both point-based and percent-based indicators together on it.

maybe i should use two set of data simultaneously?but it's really very plaguy:(

regards.

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Wed Dec 02, 2009 5:11 pm

You could use a percent move on the price of the underlying (or "spot" price). The potential problem arises because the actual price change you experience when in a position is different than the price change on the spot during that time! Roll yield, convergence, yada yada. You should test the idea of a percentage move in the context of your own system.

The ATR will always be some small percentage of the price. For the scale you present (200 point move on 4000 Vs. 200 point move on 1200), I suspect that an ATR-based signal might work just fine. Of course, you should test that yourself. :-)

Background: Generally speaking, every underlying has some "normal" range of volatilities, depending on its current state. As an example, the S&P 500 typically has a 35-day ATR around 1% of the price during slow-moving bull markets, a little higher during bulls that are stretched, and even higher during bear markets or rapid declines. Meanwhile, currency crosses typically have much lower ATR/price ratios with the idea of "bull" or "bear" being moot, since it's a cross of two issues. Other commodities have slightly different "normal" volatilities. So I think that, perhaps, an ATR-based signal would be more likely to "translate" across different contracts than a percentage-based move would be. Of course, you should test that in the context of your system.

AFJ Garner
Roundtable Knight
Roundtable Knight
Posts: 2075
Joined: Fri Apr 25, 2003 3:33 pm
Location: London
Contact:

Post by AFJ Garner » Thu Dec 03, 2009 3:11 am

CSI and Trading Blox give you access to the "unadjusted close". You may wish to experiment with this.

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Thu Dec 03, 2009 8:23 am

The "unadjusted close" will probably be closer to the actual movement you would have experienced being long (or short) the contract than the spot price would be. Good idea!

It still won't exactly match since it won't capture roll yield (or loss). But if it's more commonly available than the spot price, and if a percentage indicator is really needed, UAC is better than looking for an accurate spot price (just my opinion). Thanks for pointing that out ...

yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

Post by yoyo2000 » Thu Dec 03, 2009 10:24 am

nodoodahs,your thouhgt about ATR is very intelligent,yes,in general,low price results in a relative low price range in any market state,in this case,it's fine to use point-based price series.

AFJ Garner,neither CSI nor blox provides unadjusted or spot data of my country's markets,so I have to collect them mannually.but the proposal of getting "real" percent change of a position is similar in spit of markets,the algorithem of calculating with (price change between exit and entry point in point-based price series / actual entry price on unadjusted price) should be fine,that's my thought about using two sets of price data for a commodity: one is back-adjusted price series,and one is unadjusted price series.

but use percent-based technical analysis indicators in point-based price series is still a problem.in this case,in order to eliminate Roll yield,contango,ect.,maybe i have to get the RAD price series,how plaguy it is! :(

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Thu Dec 03, 2009 12:20 pm

The point of using ATR rather than %age-based moves is that the ATR will better scale itself to the different average volatility of different instruments. Using a percentage-based move of X percent might trigger a higher number of trades in some commodities than in does in most equities, and the same magnitude of percentage move might trigger very few trades in currencies. On the other hand, an ATR-based move should be more consistent across contracts. If that's a concern of yours ...

Of course it's possible to devise a trading system based on spot moves, and then apply it to futures contracts. There are various concerns with this approach in my opinion:

* time-value of money issues with fair-value pricing of contracts
* yield of Ts held for margin when compared to a "spot" investment in the underlying
* roll yield or loss
* the fact that leverage, once applied, is no longer constant and is path-dependent

It's a lot to consider.

svquant
Roundtable Knight
Roundtable Knight
Posts: 126
Joined: Mon Nov 07, 2005 3:39 am
Location: Silicon Valley, CA
Contact:

Post by svquant » Thu Dec 03, 2009 1:00 pm

Yoyo2k,

There was a blox posted that did calculate % daily return for a futures contracts assuming an unadjusted value (close, last bid, last ask) is also saved into the file. This method has some inaccuracies around the rollover date and you'll need to decide if that induced "error" is something that will impact your strategy. There is a way to extend this that will eliminate the error but it is a lot of coding and data manipulation.

Additionally you might want to look at ratio adjusted contracts (although CSI does not support these from what I remember). For this type of data % works but bigpointvalue calculations do not. You can possibly generate or obtain these and load them as aux data into blox along with the standard BAC data.

yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

Post by yoyo2000 » Sun Dec 13, 2009 9:18 pm

svquant wrote:Yoyo2k,

There was a blox posted that did calculate % daily return for ......
yes,that's what I will do,thanks.
nodoodahs wrote:Of course it's possible to devise a trading system based on spot moves, and then apply it to futures contracts.
......
* the fact that leverage, once applied, is no longer constant and is path-dependent
nodoodahs,do you mean,mixing back-adjusted futures' data and relating spot data would result in a leverage-altering and path-dependence?could you tell me more about thi issue.please? I didn't notice this issue before.
thanks in advance.

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Sun Dec 13, 2009 10:04 pm

If I'm using the spot prices to develop a trading system, I'm simulating actually buying the underlying.

I mentioned four specific concerns with using a system designed on spot prices, against futures contracts. You are focusing on one of them, the impact of leverage.

Leverage, once applied, is no longer constant and is path-dependent.

The various contracts can be bought with overnight minimum margin well below the value of the underlying. Last I checked - it's been a while - the retail trader is looking at a maximum of 15 times leverage on the equity indices and 21 times leverage on most of the currencies.

Let's assume for argument's sake I buy contracts equating to 2 times leverage.

If the underlying goes up, I get a profit, and if I don't buy additional contracts in order to keep my leverage constant, my leverage will actually go DOWN. So if the underlying moves in my favor my leverage is reduced, unless I rebalance, and the first moves are at 2:1 while subsequent moves are at LESS than 2:1.

If the contract moves AGAINST me, then my leverage goes UP as I take capital losses. If I lose too much, I get a margin call and am forced to either sell or provide more capital. As it moves more and more against me, subsequent moves are at MORE than 2:1.

Hence, leverage is not constant and the impacts of leverage on my return stream are path-dependent.

The system designed on the spot prices produces returns that, not including the other three issues mentioned in my previous post, are as if you bought the contracts on a fully-capitalized basis and kept them that way.

borderline
Roundtable Fellow
Roundtable Fellow
Posts: 65
Joined: Thu Mar 26, 2009 12:19 am
Location: Austin

Post by borderline » Sat Jan 09, 2010 3:59 pm

noodahs,

are the spot issues you mention really issues if your signals are based on spot but your backtest execution results are based on futures? I can't see how they would be...

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Sat Jan 09, 2010 6:35 pm

My concern was spot signals and spot returns applied to futures. With spot signals and b/t futures returns, I think it's reasonably OK.

Post Reply