Monthly Archives: December 2013

Another Glimpse at a weeks Movement

I may have done something similar to this before, but now it is better filtered, more accurate, and most importantly, more specific. Interesting results..

Reading the chart:
The max AND min of the week occur both on Monday 2.86% of the time. Obviously, given the weeks likely movement, the max and min of the week don’t happen on the same day very often; it basically only happens when a huge news move hits and sends the rest of the week into a contracting range. It appears that Mondays are a really important day here. Monday occurs as the weeks max or min over 50% of the time. In fact, closer to 75% of the time.

siomething

It’s showing the nature order of the market to trend (directional) rather than chop/congest (non-directional). One would assume that if the markets were more random, that the Monday-Thursday extremes would occur about as frequently as Tuesday-Friday (both having the same time span), but there is a huge difference in probability. There isn’t an easy way to trade profitably using this, but it’s quite useful to know.

All this is of course, pending the quality of my coding. What’s the main difference between this statistic and this one?:

https://lgtrades.wordpress.com/2013/07/11/week-max-min-statistic/

They’re built slightly different, but Mondays are much more pronounced in this second doing of the statistic than they were in the first. Why? The data is slightly different; One is built using daily data, and one is built using 1hr data. Additionally, I realized that they’re built using different hours and cutoffs for days. My hourly composed data is made with the 20:00-19:00 EST in mind, that is, if an extreme occurs anytime between 20:00-00:00 EST, I count that towards the next day. However, the daily data from the original statistic is made with the more obvious 00:00-23:59 EST.

CaptureIf you look at the “composed from daily” there’s a good bit of extremes occurring on Sundays. However, those Sunday extremes are more often than not occurring in the zone which my hourly composed data would consider it as a Monday. If you combine the Sun/Mon on the daily data, you get the chart on the far top right, which brings it up to ~29% as opposed to the 39% that I’m showing in my new statistics. Slightly better, but still a bit off. The Tuesday/Wednesday statistics are much closer together, and the Thursday/Friday stats are a bit off, which can now also be attributed to the hour differences in calculating extremes.

Upon settling these difference, something seems to stand out. It looks like in order to get the stats to match up, a large portion of the Monday extremes are actually occurring the window of 20:00-23:59 EST on Sunday, and likewise a large portion of the Friday extremes are occurring in the window of 20:00-23:59 EST on Thursday.

A week’s type does not seem to have an effect on the types of waves it may contain, either in type (A/B/C/D/E) or direction (HH/LL). I’ll continue to dig through and try preconditions.

Advertisements

Starting Studies of the weekly

Edit: Much better. Makes a lot more sense. First step!

Mondays and Fridays are the weeks extremes. I’ve previously done some work in this area without discriminating against full weeks, but now I’m only looking at data that goes fully from Monday-Friday without any missing hours. ~14 years of data dropped down to about 10 or 560 weeks.

Capture

Lot of work to do in the coming weeks

Looks like I need a different way to code weekly waves, or just waves in general:

Capture

Where to?

There’s a delicate balance between readily leaving an idea that doesn’t work and hastily escaping one that hasn’t been exhausted. Have I said that before?

I finally decided to really see the results of the work I’ve been putting in. I drew in my beloved waves manually on a chart and separated them out. If I had an indicator to read my mind and put lines on a chart, here’s the result:

Capture

 

The first thing that’s glaring wrong (in my opinion, and I’ve known this fore quite some time now) is all the gapping that’s appearing in the chart. This is simply because my waves as they stand only care about expansion. The gap areas are all retracement. I could simply attach the last line from the extreme to the 20:00 ‘open’ but is this right? Does this leave something out? I think so. I think the problem it creates is that I now technically have waves that don’t exist. They’re not defined by A/B/C/D/etc, because each successive letter denotes a new high/low. So I need to either redo the waves, or incorporate a second layer, a retracement layer. I feel the first is cleaner I feel.

However as wrong as this model may feel, it does do something correct: It’s always captures the high/low of the day, and those are the most important points at the moment.

 

A Study of “Both”

Up until now, I’ve been coding Boths, aka, a bar that makes both a new LL and a new HH, as whatever came before it. However I questioned it recently. Perhaps Both bars favored one direction over the other?

Capture

 

Capture1

 

I seem to be okay. It’s also good to know more about the Both bars in general. It appears that by 2:00 they’re all cleared up, which makes sense because Both bars generally occur when there isn’t enough movement in the day yet and it’s easy to reach both extremes. There are roughly similar chances for a HH or LL to appear before or after a Both bar, so to count them as null bars, or in the same direction that it’s already moving in, is okay to me.

 

Small self post

It surprises me how far my VBA skills have advanced. There’s still so much that I don’t know and for the things I’m doing, I’ll probably never learn about. But I’ve learned some things that have become invaluable to executing fast code.

 

I’ve learned that for whatever reason, VBA isn’t a fan of the cut past option, regardless of the cutcopymode=false line. I’m not entirely sure what the line means, but I’ve heard that it’s suppose to clear the memory of excel (as far as it’s cut/copy memory is concerned). This makes sense as once you’ve cut something, you no longer need excel to store it since it’s in the place where it needs to go. However, when running code that is as lengthy as mine is (10s of thousands of pieces of data), the code starts lagging, freezing up, and sometimes crashing the program. The workaround for this is that excel has no problem  inserting data from another cell.

In other words, excel does not like:

cut A1 and place it in A2

But there’s no issue with

make A2=A1, then delete A1

The second piece of code runs MUCH MUCH faster (less than 2 seconds whereas my cut paste code was taking me as long as 5-10 minutes to run with the chance to crash). Additionally, bulk deleting makes it so you often don’t have to run the second part of the second code until all the values have been inserting.

The following code I was using to shift data. the before and after. I had data stored in 7 columns that ran down (columns A-G, rows 1-x. I call this vertical data) I wanted the data to be “pushed” in a sense, to be formatted in 7 ROWS, running to the right (columns A-x, rows 1-7, or horizontal data).

Before:

Sub datapush()
‘second part containing max/min/high/low
Cells(1, 1).Select
executionnumbers = ActiveCell.End(xlDown).Row
For x = 1 To executionnumbers
Range(Cells((x + 1), 1), Cells((x + 1), 7)).Select
Selection.Cut
Range(“I1: N1”).Select
ActiveSheet.Paste
Application.CutCopyMode = False

‘for max
Cells(1, 9).Select
Selection.Cut
Cells(3, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for min
Cells(1, 10).Select
Selection.Cut
Cells(4, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for High
Cells(1, 11).Select
Selection.Cut
Cells(5, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for Low
Cells(1, 12).Select
Selection.Cut
Cells(6, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for size
Cells(1, 13).Select
Selection.Cut
Cells(7, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for first
Cells(1, 14).Select
Selection.Cut
Cells(8, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
‘for same/difference
Cells(1, 15).Select
Selection.Cut
Cells(9, (x + 8)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Next x
End Sub

 

 

After:

Sub smarterdatapush()
‘second part containing max/min/high/low
‘places cells starting with the I1 cell
Cells(1, 1).Select
executionnumbers = ActiveCell.End(xlDown).Row
executionrows = ActiveCell.End(xlToRight).Column
‘for how many columns of data there are
For y = 1 To executionrows
‘for how many rows of data there are
For x = 1 To executionnumbers
‘where to place data
Cells(y, 8 + x) = Cells(x, y)
Next x
Next y
End Sub

Wave modeling 1.6 (time)

-Following up on the journal entry I wrote. The results here need to be looked at; I might have some sloppy coding leading to some waves being classified as the wrong one. Yet I still consider these results fairly accurate.

In this project I looked at the simple time when the MM begins. I’ve previously done some work on when the MM ends as well as how long the waves are (which I think should be redone), but I haven’t done the simpleton approach of when the wave begins.

Capture

The A waves aren’t shown for obvious reasons, and it might be worth noting that A waves make up about 23% of all waves. I think there’s some nice things about this info, and although mostly supporting intuition, it’s always nice to have core statistics to back it up. Since I should be mostly concerned about A-B-C waves (making up 89% of all waves), the fact that I have the nice cluster around the 2-4 AM EST, or London open gives me some ideas of how to trade moving into the day’s action. It’s basically saying I can treat B and C waves the same, which is really really good.

 

The next steps:

-Check the waves and wave sorting coding wise

-See if I can distinguish A waves from the now B/C waves.

-See if anything noteworthy is happening in the cluster times (fake outs)

Dear Journal #6

Dear Journal,

 

It’s been a while.

 

It’s been a bit tough. Out of hope? Nope. A little ‘stuck’? Certainly. Haven’t been in contact with Rel at all in a few months now so I haven’t had anyone to bounce any ideas off of or get any ideas from. Back to just me! On a brighter note the thread is still around to provide a journal of what he did, and after I exhausted myself with my route, (and took a break) I started going back and trying to dig through his stuff. What now?

Morph.

The waves that is. That’s what I think is the next step is. There’s a “goal question” I’ve had: “Where are we?” That is, I want to know that given the current price, Are we at a low of the day/week? High of the day/week? At a sequence that is likely to move lower? higher? What are the odds on that? Brief me. Currently I think that while my waves are good at condensing information down and nailing the possibilities to a good number, it’s perhaps too good. I’m not left with much wiggle room in how I’ve coded it. While this isn’t something I want to trash, because it is so condense, I think I need to add another element into the equation. That’s where Morph comes into play. There are some posts in the thread discussing how the current wave leaves possibilities to either continue on it’s wave definition or morphs into another wave with it’s own definition. So rather than saying that the wave is currently a B wave that can still turn into a C or D wave, it can be more refined to turn into some type of connector wave.

I think that’s the next step, after I finish some more work on the timings of my current waves. The time/price component (I’ve been told) is vitally important, so I will always look to see if I can find something in it when given the opportunity.