NexusFi: Find Your Edge


Home Menu

 





Excel Data Analyst Introduction


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one semiopen with 10 posts (16 thanks)
    2. looks_two SMCJB with 3 posts (4 thanks)
    3. looks_3 xplorer with 2 posts (5 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,811 views
    2. thumb_up 25 thanks given
    3. group 6 followers
    1. forum 14 posts
    2. attach_file 11 attachments




 
Search this Thread

Excel Data Analyst Introduction

  #11 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


SMCJB View Post
I performed a similar analysis once and came to similar conclusions. It's well known that while the SPX has an upward bias it's short term movement is often mean reverting. Hence combining a shorter moving average and a longer moving average (NOT a crossover system) - ie creating a 4 state system - greatly improved results - until 2018 or 2019 when it imploded impressively!

This is an updated Tradestation Equity Curve for my Dual Moving Average System (again not a crossover!). Thankfully I never traded to it. And yes the all-time peak (Aug 2018) was when this was developed. This is one of big concerns with data mining to try and find biases. Very difficult to know when you have found something and when it's just spurious! This is why I asked "if you now revisited the analysis trying to improve your states (switch earlier or later) do you feel that you would have introduced a bias?"


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #12 (permalink)
 semiopen 
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
Posts: 98 since Sep 2018
Thanks Given: 18
Thanks Received: 46

I'm trying to avoid biases. most of my thinking about possible trading strategies is how to integrate them into the VBA logic. Presumably some version of the state analysis I've been discussing would be used by the investment/trading routine.

It is pretty clear that buys should be done in the below state at some point and sells in the above. It seems obvious that the buy can wait to take advantage of the seemingly inevitable further deterioration of the indicator, but then there is the possibility of missing a move. I imagine virtually all one day trades in the below state are profitable, I meant to check that out today, the tables I posted here were originally an attempt to look at that but I got distracted by how cool they seemed to be.

Selling when an above state transitions to below appears to be wrong, certainly too late.

FWIW, I've been interested in EWMA - Exploring the Exponentially Weighted Moving Average

"The exponentially weighted moving average (EWMA) introduces lambda, which is called the smoothing parameter. Lambda must be less than one. Under that condition, instead of equal weights, each squared return is weighted by a multiplier..."

That looks better than my feeble attempts, I unknowingly reinvented a weighting method a few months ago that is used by Martin Pring in one of his K studies, maybe Mr. Pring has special insight but I concluded it was worthless.

Started this thread Reply With Quote
  #13 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


Hi @semiopen finally got around to reading your posts in detail.

While I found it very interesting I'm actually a little confused what the pivot tables show. For example

semiopen View Post
32 conditions are analyzed by the app - 8 different lengths of four indicators. The four indicators are: Simple MA, Exponential MA, Rate of change, and Least Square MA. I call the 8 lengths Friedmanacci numbers: 3,7,13,21,31,43,57, and 73. Possible timeframes are daily, weekly, and monthly.

There are two possible states for each condition - Above (A) and Below (B) zero (or some other number).

When the possible states are combined, as above, HProf is the buy and hold profit for the condition(s) being analyzed as well as the buy and hold profit for the instrument in general. The app invests a fixed amount of $10,000 every time the state changes and books the profit or loss for the previous state at the same time. Note that RProf (Reinvest) is higher than HProf for IWM for this time period.


So what does the pivot table show? I understand how the states work but is it one single indicator with one single time period (13?) or is it all 4 indicators with one single time period (13?) or am I completely misinterpreting "Condition 13L"

I recently did something similar in R but a lot larger, and only focused on next day returns not the total return until the state changes. I took about 30 conditions, some were price related, some volatility, some range, each having a True(1) or False(0) flag. I then combined the conditions in every single possible pair combination. So 30*2*29*2 = approximately 3500 different state combinations. For example One Pair would be Condition 1 False and Condition 19 True which might equate to Price Not Above SMA and Volatility High. I then ranked all possible pairs to see which performed best (potential buy) and worse (potential sale) and also applied some other filters (min number occurrences etc). I did this 4 months in a row, for 4 different symbols, picking pairs that historically did well. I then used the results to develop 4 systems that I then entered into a four 6 month 'incubation' competitions. Obviously I know this was some extreme data mining but was curious how they would perform. The first system is now 4.5 months in and after a few good weeks has turned negative. The second system is 3.5 months in and every single trade has been a loss. The third system is 1.5 months in and was up until a bad trade last week. The fourth system is 0.5 months in and has been stopped out on all 3 trades. So extremely ugly. Data mining at it's extreme worse.

With regards to EWMAs, you might want to also look at Adaptive Moving Averages. If you want to get really technical take a look at Digital Signal Processing. An EWMA is basically a Single Pole Low Pass Filter in DSP.

Reply With Quote
Thanked by:
  #14 (permalink)
 semiopen 
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
Posts: 98 since Sep 2018
Thanks Given: 18
Thanks Received: 46

13L is a 13 day least square moving average. I'm changing the naming convention to L13. Both states are combined in the chart so it show the results of buy and hold in addition to the other two investment styles.

I was kind of thinking of drawing random lines as opposed to other indicators. Then the idea is to see how far back in time the line has to go to equalize returns between above and below that line.

This is a report i just created. It shows major ETFs and the current status of 6 rate of change strategies - R03 is the 3 period rate of change. R03P shows the number of days the current state has been active and R03R is the profit as a percent from the start of the state. If the state is above zero, R03P (or other P column) is positive; if it is below zero it will be negative.



This one is current state of exponential moving averages. Notice all XLV averages turned positive today. Unfortunately XLV doesn't play above the line real well.


Started this thread Reply With Quote
  #15 (permalink)
 semiopen 
hillsborough nj
 
Experience: Advanced
Platform: Tradestation/Excel
Broker: TradeStation
Trading: emicro
Posts: 98 since Sep 2018
Thanks Given: 18
Thanks Received: 46

I noted in the previous post that XLV doesn't do well in above states compared to below states.

The first two tables are for XLV performance above since March, 2015. Charts use running totals.






The next two are for below performance.




Started this thread Reply With Quote




Last Updated on September 12, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts