Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jperl

Trading with Market Statistics V. Other Entry Points

Recommended Posts

  Dogpile said:
feel free to help out at the Tradestation forum site for this:

 

https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=66875&SearchTerm=VWAP&txtExactMatch=

 

Sadly I don't have access there any more :( There are some forums that are public still (I think) but that one you need to be logged on for. Perhaps you can keep us informed if there are significant developments (though this might not be the appropriate thread to do it).

Share this post


Link to post
Share on other sites
  dbntina said:

I am really enjoying how you use market statistics to trade...thank you for sharing the insights into your method. I am new to intraday trading and it is refreshing to see a new twist on plotting distributions (like market profile).

 

I had a more experienced trader tell me one time that you have to find a method that speaks to you. Being mathematically inclined I am really enjoying this way of looking at the market. It is speaking to me "so to speak"

 

Glad you are finding that market statistics speaks to you dbntina. It speaks to me too. I realize for many traders, statistics is a difficult subject, so that is why I am trying to approach this in a slow methodical way, in the hope that those who are not generally familiar with statistical analysis will be able to follow along.

Starting with the next thread on scale-in, stoploss and trade management we will be getting into virgin territory for most new traders.

Share this post


Link to post
Share on other sites

Jerry,

 

Very much looking forward to it...(the next thread).

 

I think I have finished the code for tradestation users to get on an intraday chart the VWAP (same code as posted in the forum under VWAP_H) with the calculation of Standard Deviation from the square root of the variance but bands seem farther out than the one currently posted in the TS forums. I put everything in one indicator to do all plots with 1st and 2nd SD's.

 

Is there any way you can tell me where the VWAP and 1SD and 2SD bands ended today on your 2m chart of either the S&P or NQ. That will let me know if I have it right and then I will post on the forums the code or here...whatever suits everyone.

 

The question I have also is on the Variance formula I don't see it dividing by the result by the total number of price bars since the start but when you gave an example you did divide by the total number of bars. That's how I calculated it but didn't know if that was correct?

 

Thanks a bunch...will get it posted for TS users once I can verify it looks like yours.

 

dbntina

David

Share this post


Link to post
Share on other sites

jerry, since Newbie is using purely mathematical techniques, would you mind sharing the back-tested results for say, what you presented in 'V'? did the back-test optimize to an optimal stop placed above the PVP for a short/below for along? just curious if recent trading lines up with 'theory' of a skewed distribution...

 

also, is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

Share this post


Link to post
Share on other sites
  Dogpile said:

also, is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

 

 

I find this to be a good question that I wanted to ask as well. I have been observing the markets (mostly the YM) and I find it rare to find a skew at all... seems like prices are always near the VWAP and the PVP runs through it, so there is seldom anything to trade at all, unless I am not using the proper tools. (the vwap I use was programmed by a third party for amibroker)

Share this post


Link to post
Share on other sites
  dbntina said:

Is there any way you can tell me where the VWAP and 1SD and 2SD bands ended today on your 2m chart of either the S&P or NQ.

 

David,

Here is the end of day VWAP +- SD for today August 2, 2007

 

ES 1474.11 +- 3.64

NQ 1968.52 +-5.77

 

  dbntina said:
The question I have also is on the Variance formula I don't see it dividing by the result by the total number of price bars since the start but when you gave an example you did divide by the total number of bars. That's how I calculated it but didn't know if that was correct?

 

No, it is not correct. To compute the variance correctly, use the equation I posted in the SD thread post 14545

 

You have to multiply each term in the variance by the probability distribution for the volume because the VWAP is volume weighted. That takes care of the normalization factor. The example I gave, had no weighting factor, so the variance was simply divided by the number of terms in the summation.

Share this post


Link to post
Share on other sites
  Dogpile said:
jerry, since Newbie is using purely mathematical techniques, would you mind sharing the back-tested results for say, what you presented in 'V'? did the back-test optimize to an optimal stop placed above the PVP for a short/below for along? just curious if recent trading lines up with 'theory' of a skewed distribution...

 

There is actually no good way to back test something like this Dogpile, because the distribution function, the volatility and HUP distribution (Hold Up Price, which we haven't discussed yet) is constantly changing from day to day. What you will discover in the next thread, is a new paradigm about stop loss placement and trade management.

 

  Dogpile said:
is there a minimum difference between the PVP and the VWAP before the skew is considered significant enough to 'play'... ie, # of ATRs difference...?

 

Very good question, glad you asked. I'll phrase it differently. How large does the skew have to be to consider taking a trade at the VWAP or SD in the direction of the skew.

The answer is: I was concerned about this for a long time. It turns out, that there is no correlation between the size of the skew (as measured by the Karl Pearson definition of skew which is (VWAP-PVP)/SD ) and the momentum of the trade in the skew direction. What only seems relevant is that a skew exist. Other HUPs will come into play between the entry point and the profit target which will play an important role in the momentum of the trade. We will discuss these in a later thread.

Share this post


Link to post
Share on other sites

Trade Station Users,

Jerry gave good description of SD function and how to calculate it in thread #IV. In the same thread I have posted code for calculating simulated SD, which tracks pretty close with ensign SW and jerry's calculation. Important point is that SD is cumulative calculation with lookback period changing thru the day to always start at the beginning of the session ( basically one has to count bars and change lookback period to include data from the first bar of the day. SD is calculating price distribution around VWAP. What SD calculation is is missing is vi/V factor vi is volume @ price; V is total volume for the session.

Share this post


Link to post
Share on other sites

<<It turns out, that there is no correlation between the size of the skew (as measured by the Karl Pearson definition of skew which is (VWAP-PVP)/SD ) and the momentum of the trade in the skew direction. What only seems relevant is that a skew exist. >>

 

thx. the problem is that if not much skew, then the stop point (PVP) will be very close to the VWAP price -- where you might be entering.

 

for example, market trades down and then retraces back up to the -1 SD level, you enter short with stop just above PVP. market trades to VWAP and overshoots a bit on noise. here is where a tight PVP might be a problem... I guess such is life.

Share this post


Link to post
Share on other sites
  Unleashed said:
I find this to be a good question that I wanted to ask as well. I have been observing the markets (mostly the YM) and I find it rare to find a skew at all... seems like prices are always near the VWAP and the PVP runs through it, so there is seldom anything to trade at all, unless I am not using the proper tools. (the vwap I use was programmed by a third party for amibroker)

 

Unleashed, perhaps you can post a chart of what you see and I can take a look

Share this post


Link to post
Share on other sites
  jperl said:

What you will discover in the next thread, is a new paradigm about stop loss placement and trade management.

 

Other HUPs will come into play between the entry point and the profit target which will play an important role in the momentum of the trade. We will discuss these in a later thread.

 

 

Really looking forward to these missing pieces of the puzzle. (and getting hold of/writing some indicators so I can follow along properly).

Share this post


Link to post
Share on other sites

Okay...I thank I got it...just need to figure out where/how to post the code in here.

 

Thanks for your help Jerry. I was able to match your numbers yesterday on ES and NQ within a tick or two so I will consider it matched.

 

Any TS coders take a look and see if it looks correct please.

 

Thanks everyone...looking forward to learning more Jerry,

 

dbntina

 

;)

Share this post


Link to post
Share on other sites

nice job dbntina -- that looks visually right -- I am not an advanced EasyLanguage guy but the bands look great.

 

would you know how to code 'PVP' to update dynamically? it is the same number that appears in the matrix window under 'Vol Bars'... would just like to place that into a 'chart analysis' window as a histogram indicator on the left side of the chart (Y axis).

Share this post


Link to post
Share on other sites

Thanks Dogpile...I am pretty confident in the formula because it is exactly the same as jperl posted. The only thing I was mainly concerned with is if the count was off by 1 bar for looping and summing the terms. It looks correct though when I look at the chart because the bands move on the 2nd intraday bar, not the 1st or 3rd so it seems to be working correctly and it matches jperls numbers (within a tick or two).

 

After looking at past intraday data it is scary how well the bands are acting as support and resistance.

 

Anyway...I am disappointed in TS and the market profile thing. Esignal has an add on for $10 a month or something like that and TS has nothing. The probability map stinks in my opinion and I actually was using marketprofileplus for a while and ghkramer has a decent one that I can't get to work on my machine (and believe me I am thankful for guys like ant and ghkramer) but TS is dropping the ball big time on this and I like TS.....

 

So the bottom line is I will probably have to write market profile code myself because I do want to know the PVP/POC (if they are exactly the same...they probably are a little different if you are using a smaller tf than 30M??) and VAH and VAL from previous days and the developing numbers as they do act as HUP's just like pivot points and such good to be aware of.

 

Anyway writing that code should make it easier to write the code for volume distribution as well. The problem I am going to have is figuring out exactly the formulas for calculating all the stuff...once I get that then I should be able to crank it out...we'll see I am kind of dreading it actually.

 

So the short answer dogpile is I don't have code for that....anyone else...of course if I create it I will post it for free.

 

Sorry this went a little of topic...ranting a little bit

 

dbntina

Share this post


Link to post
Share on other sites
  jperl said:
Unleashed, perhaps you can post a chart of what you see and I can take a look

 

Okay, this is my YM chart taken @ 12:29pm, as you can see the VWAP is +17 above my PVP, and I would have considered going long at 13444, it is currently 12:54 and prices are hovering around there, fell through a bit to 13430s. I am wondering if going long here would have been a good idea. (I did not, only simulating)

 

attachment.php?attachmentid=2210&stc=1&d=1186159927

Share this post


Link to post
Share on other sites

Just an update. That trade would have been good for about +15 if you entered right at the VWAP, but if you held longer would have been stopped out depending on how tight you had it...

 

Market seems pretty flat, whipsawing the VWAP and bouncing off the PVP since lunch hour.

 

 

attachment.php?attachmentid=2211&stc=1&d=1186163593

vwap2.thumb.png.6abc751fd86856c3bdcea44177970c6a.png

Share this post


Link to post
Share on other sites

finally with patience a good move to the upside was there if your stops were wide enough...

 

If it wasn't obvious enough the VWAP is the yellow moving average line, and the red line mixed into it is the 89 EMA, solid horizontal line is the PVP.

 

Move was good for about +50 YM points if you had good nerves :).

 

attachment.php?attachmentid=2212&stc=1&d=1186164448

 

edit - DAMN, after this 'trade', at that 13500 level, the YM dropped 100 points in less than half an hour...

vwap3.png.f47860ef45beb4932e6d0e3c127a48fb.png

Share this post


Link to post
Share on other sites
  dbntina said:
Okay...I thank I got it...just need to figure out where/how to post the code in here.

 

Thanks for your help Jerry. I was able to match your numbers yesterday on ES and NQ within a tick or two so I will consider it matched.

 

Any TS coders take a look and see if it looks correct please.

 

Thanks everyone...looking forward to learning more Jerry,

 

dbntina

 

;)

 

You could either cut and paste the test into a message. Or use the 'manage attachments button' down below the message posting box.

 

Cheers.

Share this post


Link to post
Share on other sites

Blowfish,

 

The code is posted in the indicators section.

 

Nick had a good question about using the normalized volume to multiply with in the variance formula.

 

The indicator is doing that in the calculation. It is taking the volume of the current bar and dividing it by the total volume since the start and using that to multiply the square of the difference between price and the VWAP (and then summing all the terms of course)

 

I am pretty sure that's what we were trying to accomplish.

 

Take a look and see if the code looks correct...if not we want to catch it now. I think that is what Jerry was getting at when calculating it (that was causing the calculation to be a nightmare).

 

Cheers,

 

dbntina

Share this post


Link to post
Share on other sites
  Unleashed said:
finally with patience a good move to the upside was there if your stops were wide enough...

 

Ok, for your reference unleashed, I took a look at YM at 12.28 EST. My values for VWAP and PVP are as follows:

 

VWAP= 13445

PVP = 13433 for a difference of 12 ticks.

 

And yes you could have taken the trade at 13445 and exited at the 1st SD which was 13472 at 13:54 EST for a profit of 27 ticks or held on until the 2nd SD at 13500 14:02 EST for a profit of 55 ticks.

 

HOWEVER---if you set a stoploss at the PVP you would have been stopped out earlier with a loss on the trade. This is a good example of why hard stoplosses will slowly bleed you to death. In the next thread we will discuss an alternate paradigm called risk tolerance to replace hard stop losses

Share this post


Link to post
Share on other sites

Great point Jerry. I was looking at the same thing on my chart with the bands and saw the spike just below the PVP to stop you out...before moving towards the bands....very interested in seeing the risk tolerance ideas...etc.

 

dbntina

Share this post


Link to post
Share on other sites
  jperl said:

This is a good example of why hard stoplosses will slowly bleed you to death. In the next thread we will discuss an alternate paradigm called risk tolerance to replace hard stop losses

 

Fixed stops (and targets for that matter) are quick and dirty but take no account of changing volatility. I kind of favour using market structure (previous swing high/lows) but of course absolutely everyone know stops are located there and so they are frequently run. Then of course you can place the stop 'a few' ticks outside but that is kind of arbitrary too.

 

Dbtina thanks I'll take a look. I have concidered the PoC stuff and whilst not hard it will be a bit 'tricky' volume at each level will need accumulating in an array. I can't help feel there should be a code fragment somwhere to do this.

 

Cheers.

Share this post


Link to post
Share on other sites

Blowfish,

 

Yes I am thinking about writing some simple code for the PVP and POC intraday and maybe including that in the VWAP, SD bands code so that it will all be in one place.

 

The challenge is going to be when JPERL starts looking at the weeks PVP/POC with the weeks VWAP and SD bands and using that as a framework in framing the days statistics and taking trades that way.

 

Because I will have to figure out how to do that in code for TS as well...man this coding stuff gets tiring after a while.

 

I don't know for sure but I have a feeling JPERL is heading that direction.

 

Also the POC is simply where the most 30M TPO's occur horizontally correct...this is not the same where the most volume traded at price correct? (PVP) Just want to make sure I have it correct before trying to code it.

 

Cheers,

 

dbntina

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • Thx for reminding us... I don't bang that drum often enough anymore Another part for consideration is who that money initially went to...
    • TDUP ThredUp stock, watch for a top of range breakout above 2.94 at https://stockconsultant.com/?TDUP
    • How long does it take to receive HFM's withdrawal via Skrill? less than 24H?
    • My wife Robin just wanted some groceries.   Simple enough.   She parked the car for fifteen minutes, and returned to find a huge scratch on the side.   Someone keyed her car.   To be clear, this isn’t just any car.   It’s a Cybertruck—Elon Musk's stainless-steel spaceship on wheels. She bought it back in 2021, before Musk became everyone's favorite villain or savior.   Someone saw it parked in a grocery lot and felt compelled to carve their hatred directly into the metal.   That's what happens when you stand out.   Nobody keys a beige minivan.   When you're polarizing, you're impossible to ignore. But the irony is: the more attention something has, the harder it is to find the truth about it.   What’s Elon Musk really thinking? What are his plans? What will happen with DOGE? Is he deserving of all of this adoration and hate? Hard to say.   Ideas work the same way.   Take tariffs, for example.   Tariffs have become the Cybertrucks of economic policy. People either love them or hate them. Even if they don’t understand what they are and how they work. (Most don’t.)   That’s why, in my latest podcast (link below), I wanted to explore the “in-between” truth about tariffs.   And like Cybertrucks, I guess my thoughts on tariffs are polarizing.   Greg Gutfield mentioned me on Fox News. Harvard professors hate me now. (I wonder if they also key Cybertrucks?)   But before I show you what I think about tariffs… I have to mention something.   We’re Headed to Austin, Texas This weekend, my team and I are headed to Austin. By now, you should probably know why.   Yes, SXSW is happening. But my team and I are doing something I think is even better.   We’re putting on a FREE event on “Tech’s Turning Point.”   AI, quantum, biotech, crypto, and more—it’s all on the table.   Just now, we posted a special webpage with the agenda.   Click here to check it out and add it to your calendar.   The Truth About Tariffs People love to panic about tariffs causing inflation.   They wave around the ghost of the Smoot-Hawley Tariff from the Great Depression like it’s Exhibit A proving tariffs equal economic collapse.   But let me pop this myth:   Tariffs don’t cause inflation. And no, I'm not crazy (despite what angry professors from Harvard or Stanford might tweet at me).   Here's the deal.   Inflation isn’t when just a couple of things become pricier. It’s when your entire shopping basket—eggs, shirts, Netflix subscriptions, bananas, everything—starts costing more because your money’s worth less.   Inflation means your dollars aren’t stretching as far as they used to.   Take the 1800s.   For nearly a century, 97% of America’s revenue came from tariffs. Income tax? Didn’t exist. And guess what inflation was? Basically zero. Maybe 1% a year.   The economy was booming, and tariffs funded nearly everything. So, why do people suddenly think tariffs cause inflation today?   Tariffs are taxes on imports, yes, but prices are set by supply and demand—not tariffs.   Let me give you a simple example.   Imagine fancy potato chips from Canada cost $10, and a 20% tariff pushes that to $12. Everyone panics—prices rose! Inflation!   Nope.   If I only have $100 to spend and the price of my favorite chips goes up, I either stop buying chips or I buy, say, fewer newspapers.   If everyone stops buying newspapers because they’re overspending on chips, newspapers lower their prices or go out of business.   Overall spending stays the same, and inflation doesn’t budge.   Three quick scenarios:   We buy pricier chips, but fewer other things: Inflation unchanged. Manufacturers shift to the U.S. to avoid tariffs: Inflation unchanged (and more jobs here). We stop buying fancy chips: Prices drop again. Inflation? Still unchanged. The only thing that actually causes inflation is printing money.   Between 2020 and 2022 alone, 40% of all money ever created in history appeared overnight.   That’s why inflation shot up afterward—not because of tariffs.   Back to tariffs today.   Still No Inflation Unlike the infamous Smoot-Hawley blanket tariff (imagine Oprah handing out tariffs: "You get a tariff, and you get a tariff!"), today's tariffs are strategic.   Trump slapped tariffs on chips from Taiwan because we shouldn’t rely on a single foreign supplier for vital tech components—especially if that supplier might get invaded.   Now Taiwan Semiconductor is investing $100 billion in American manufacturing.   Strategic win, no inflation.   Then there’s Canada and Mexico—our friendly neighbors with weirdly huge tariffs on things like milk and butter (299% tariff on butter—really, Canada?).   Trump’s not blanketing everything with tariffs; he’s pressuring trade partners to lower theirs.   If they do, everybody wins. If they don’t, well, then we have a strategic trade chess game—but still no inflation.   In short, tariffs are about strategy, security, and fairness—not inflation.   Yes, blanket tariffs from the Great Depression era were dumb. Obviously. Today's targeted tariffs? Smart.   Listen to the whole podcast to hear why I think this.   And by the way, if you see a Cybertruck, don’t key it. Robin doesn’t care about your politics; she just likes her weird truck.   Maybe read a good book, relax, and leave cars alone.   (And yes, nobody keys Volkswagens, even though they were basically created by Hitler. Strange world we live in.) Source: https://altucherconfidential.com/posts/the-truth-about-tariffs-busting-the-inflation-myth    Profits from free accurate cryptos signals: https://www.predictmag.com/       
    • No, not if you are comparing apples to apples. What we call “poor” is obviously a pretty high bar but if you’re talking about like a total homeless shambling skexie in like San Fran then, no. The U.S.A. in not particularly kind to you. It is not an abuse so much as it is a sad relatively minor consequence of our optimism and industriousness.   What you consider rich changes with circumstances obviously. If you are genuinely poor in the U.S.A., you experience a quirky hodgepodge of unhelpful and/or abstract extreme lavishnesses while also being alienated from your social support network. It’s about the same as being a refugee. For a fraction of the ‘kindness’ available to you in non bio-available form, you could have simply stayed closer to your people and been MUCH better off.   It’s just a quirk of how we run the place and our values; we are more worried about interfering with people’s liberty and natural inclination to do for themselves than we are about no bums left behind. It is a slightly hurtful position and we know it; we are just scared to death of socialism cancer and we’re willing to put our money where our mouth is.   So, if you’re a bum; you got 5G, the ER will spend like $1,000,000 on you over a hangnail but then kick you out as soon as you’re “stabilized”, the logistics are surpremely efficient, you have total unchecked freedom of speech, real-estate, motels, and jobs are all natural healthy markets in perfect competition, you got compulsory three ‘R’’s, your military owns the sky, sea, space, night, information-space, and has the best hairdos, you can fill out paper and get all the stuff up to and including a Ph.D. Pretty much everything a very generous, eager, flawless go-getter with five minutes to spare would think you might need.   It’s worse. Our whole society is competitive and we do NOT value or make any kumbaya exception. The last kumbaya types we had werr the Shakers and they literally went extinct. Pueblo peoples are still around but they kind of don’t count since they were here before us. So basically, if you’re poor in the U.S.A., you are automatically a loser and a deadbeat too. You will be treated as such by anybody not specifically either paid to deal with you or shysters selling bejesus, Amway, and drugs. Plus, it ain’t safe out there. Not everybody uses muhfreedoms to lift their truck, people be thugging and bums are very vulnerable here. The history of a large mobile workforce means nobody has a village to go home to. Source: https://askdaddy.quora.com/Are-the-poor-people-in-the-United-States-the-richest-poor-people-in-the-world-6   Profits from free accurate cryptos signals: https://www.predictmag.com/ 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.