How can I test this...? - futures io
futures io futures trading



How can I test this...?


Discussion in Stocks and ETFs

Updated by semiopen
    1. trending_up 1,192 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 8 replies
    2. attach_file 9 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

How can I test this...?

(login for full post details)
  #1 (permalink)
Whitehall, NY
 
Experience: Advanced
Platform: TOS, Market Delta
Broker: Infinity, TOS, IB
Trading: es
 
Posts: 260 since Aug 2012
Thanks: 123 given, 381 received

I'm trying to find a platform ( can't do it on Portfolio Analyzer as they don't have enough data) that can can test this idea:

It's simply testing various moving average lengths so ....

If the SPX is above a certain moving average then we stay long the spx but if we get a monthly close below our moving average. Then we exit the spx and go long 30 year bonds and stay long until we get a monthly close in SPX above the moving average. Then we exit the bonds and get back into the SPX long. I want to test this from 1970 to present day.

Portfolio Visualizer I thought was going to work but it is limited. I like their metrics though.


any help would be appreciated.

Volt

Reply With Quote

 
 
(login for full post details)
  #3 (permalink)
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
 
Posts: 91 since Sep 2018
Thanks: 17 given, 41 received


I specialize in indicators that can be expressed as a positive negative number versus stock prices, use Excel VBA, and look at daily weekly and monthly time frames. I've written some articles on above and below conditions. For example, https://seekingalpha.com/article/4276462-finite-state-accounting-improves-strategy-evaluation

The idea you present is quite bad, mainly because the market does not typically do better above a given moving average than below. Below has decisively outperformed above conditions since about 1998. I haven't specifically tested to the 1970s but I'd bet that there isn't any special insight in going back that far.

The going long bonds issue is complicated because then you have to consider dividends more seriously. However, since one makes substantial money being long in below conditions, it is possible to ignore that possibility. If there was an edge in selling below a given moving average, don't you think someone would have noticed that in the last 100 years?

My seeking alpha article deals with the 43 week moving average. The table below shows the results of trading $10K worth of SPY whenever the current price is either above or below the 73 day moving average.



FProf is 10,340 indicating one would have doubled their money by doing this from 2007. HProf is the buy and hold profit - one would have 13,915 in profit with buy and hold.

The table below shows the results of only investing $10,000 when the price is Above the average.



The next table shows the results of only investing $10,000 when the price is Below the average.



This shows a higher fixed profit number for being long above the average but note TLen is 2138 above versus 878 below, so the cost of the extra above profit was the longer holding period. HProf below is 6265 - there is no way you could get a return like that from bonds.

Also note that if we start at 2009, below will actually earn more money than above in less than half the time.

Excel VBA is an excellent platform for this type of analysis.

The portfolio allocation question is important and interesting, that gets into quantitative finance though.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Whitehall, NY
 
Experience: Advanced
Platform: TOS, Market Delta
Broker: Infinity, TOS, IB
Trading: es
 
Posts: 260 since Aug 2012
Thanks: 123 given, 381 received

Thanks Semi open. The interest rates starting rising in the 1970's so excluding that period of time would not be wise. Testing during only a falling interest rate environment is curve fitting to me but that is just my opinion. Here are the results of a very simple method...we go long on a monthly close in VFINX when it is above the 200 moving average and exit and get long bonds when we get a monthly close below the 200 MA. What am I missing here? This does better then any you are showing but that isn't the point here. I just want to test that period of time in the 1970's. I'm sorry but I'm a newbie to system testing so this may be way off but using a monthly close as a filter seems like a good idea.


Perhaps this Portfolio Visualizer has some bugs in it.......certainly not trying to be a wise guy here but I need to find something simple to use...I will read your seeking alpha posts. I appreciate you taking a crack at this and the suggestion of Excel VBA

Attached Thumbnails
Click image for larger version

Name:	model_test.png
Views:	21
Size:	59.9 KB
ID:	276931  
Reply With Quote
 
(login for full post details)
  #5 (permalink)
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
 
Posts: 91 since Sep 2018
Thanks: 17 given, 41 received

I'm pretty sure of my numbers but think the ones you posted are also correct. I go from 10/11/2007, start price of 104.58 on dividend adjusted SPY until yesterday. That is the 13,915 number. That is the profit so the total amount would be 23,195 with the original investment added in. Your image shows 27,000 but that presumably starts at the beginning of 2007.

The timing result of 43,000 is probably also correct but of dubious value. I also wrote an article about 200 day performance but it might be for premium members of seekingalpha.

Here is some 200 day analysis from that analysis -



This assumes reinvestment of profits instead of a fixed amount. That corresponds to the column RProf on the stuff I posted above. I've analyzed each of the listed trades closely, they are also based on rebalancing once a month - once a month rebalancing is pretty dumb but it does beat buy and hold if you cherry pick the start date and rebalancing day to avoid disasters like the first trading day of December last year. You buy at the big trade dispute solution weekend gap up and sell just before the 2019 rally starts and stay flat until about ES 2750.

Reinvested profits are unsound for long periods, the article I referenced was in reply to a guy who suggested starting this investment program in 1932 or something and reinvesting profits for the subsequent 88 years. Reinvested profits are reasonable in some kind of strategies but ludicrously long term growth analysis is silly from a strategy development point of view.

It's possible to download from the 1970s using yahoo but that would be ^gspc (I think) to download (S&P 500 cash).

I wasn't recommending Excel VBA simply mentioned that I use it.

Also not to be wise guy, but you asked a question and I answered it. I wasn't taking a "crack" at it.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Whitehall, NY
 
Experience: Advanced
Platform: TOS, Market Delta
Broker: Infinity, TOS, IB
Trading: es
 
Posts: 260 since Aug 2012
Thanks: 123 given, 381 received

yeah, the 200 day is certainly not an optimal length and I only put that there to try to convey what the method does. I don't think you actually answered the original post. I'm looking to test an idea not have somebody tell me it doesn't work. Also you never address the concept of moving into Bonds when you get out of the SPX......you are testing a moving average without parking the money while out of the market. You really need to read over post one then you would understand while the 1970's matters and interest rates rising might affect my results.

Thank you for trying though but I need to get into a different asset class while sitting out drawdowns in the SPX. That isn't addressed in your replies and if you are NOT suggesting Excel VBA for testing then I am not sure of the meaning of your post.

Volt

Reply With Quote
 
(login for full post details)
  #7 (permalink)
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
 
Posts: 91 since Sep 2018
Thanks: 17 given, 41 received

I ran an analysis with $SPX daily from 7/29/1999 through the close today.



This shows profit numbers for 200 day indicators.

A = Above, B = Below

E200 = EMA
L200 = Least Square MA
M200 = Simple MA
P200 = Price in Range (similar to Stochastic Oscillator)
R200 = Rate of Change

Note that M200A outperforms E200A - that's not unusual. Note L200B makes more than all the A numbers except for R200A.

If one seriously wants to play this it seems like R200A is better than the M200A. Why not Buy R200A and L200B. R200A has fewer trades than M200A.

Also note the crappiness of the entries and exits. That is quantified by AMax and AMin. The average max value of a position in M200A is 605 but by the time the average is penetrated that becomes 157.

This is a pleasant fantasy, but why not concentrate on the performance over the last 10 years?



From 2009, RProf is 10,728. That is the orange line on the graph.

M200B has been no slouch over the past decade either.



Here is the 200 day data from 2009.



M200B makes about 2700 less than M200A but the holding period is only 380 days below while you have to hold 2226 above.

Thought I'd take another crack at it.

It is an interesting issue.

Reply With Quote
 
(login for full post details)
  #8 (permalink)
Whitehall, NY
 
Experience: Advanced
Platform: TOS, Market Delta
Broker: Infinity, TOS, IB
Trading: es
 
Posts: 260 since Aug 2012
Thanks: 123 given, 381 received

ten years is too short for me......I encourage you to check out the gobs of research Antonacci did for his Duel Momentum approach.........He goes back to the 1950's..Testing in historic bull markets is so limited. I suggest a new thread if you want to post just results. This thread should really be about finding a way to test the idea posted at the start and we aren't getting anywhere towards that.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
 
Posts: 91 since Sep 2018
Thanks: 17 given, 41 received


Volt View Post
ten years is too short for me......I encourage you to check out the gobs of research Antonacci did for his Duel Momentum approach.........He goes back to the 1950's..Testing in historic bull markets is so limited. I suggest a new thread if you want to post just results. This thread should really be about finding a way to test the idea posted at the start and we aren't getting anywhere towards that.

Sorry, the post title was how can I test this...

I was trying to show you how to test this, You're right numbers are so confusing.

Reply With Quote


futures io Trading Community Traders Hideout Stocks and ETFs > How can I test this...?


October 4, 2019


Upcoming Webinars and Events
 

Introducing Edge Pools: Prop Pricing Model w/Edge Clear

Jul 9
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts