• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical Volatility Indicator?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Historical Volatility Indicator?

    Hi,

    Can anyone tell me what the correct indicator is for the historical volatility of a stock?

    Thanks in advance.

    #2
    Hello joeydisco,
    The ATR indicator measures the volatility of an instrument. Please refer here to know more about it.
    http://www.investopedia.com/terms/a/atr.asp

    The ATR indicator comes natively in NinjaTrader.
    http://www.ninjatrader.com/support/h...indicators.htm

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks but the ATR does not represent historical volatility as calculated here:

      http://www.lfrankcabrera.com/calc-hist-vol.pdf

      For instance, you would not use the ATR as a volatility input when trading options, you would use historical volatility.

      Comment


        #4
        Hello joeydisco,
        For options, VIX (symbol in NinjaTrader (^VIX) is taken to calculate the volatility. Please refer here to know more
        http://www.cmegroup.com/trading/opti...y-indexes.html

        VIX is appended as an index in NinjaTrader and you can create a chart of it if your connectivity provider provides data for VIX.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thanks.

          That is something I was looking for as well.

          Comment


            #6
            Originally posted by joeydisco View Post
            Thanks but the ATR does not represent historical volatility as calculated here:

            http://www.lfrankcabrera.com/calc-hist-vol.pdf

            For instance, you would not use the ATR as a volatility input when trading options, you would use historical volatility.
            You would have to code an indicator to use that formula then.

            Comment


              #7
              Let's say I have an equity trading system and I want to add a condition that says I should buy or sell when the VIX is X% above or below its' moving average.

              How would I go about doing this?

              Thanks.

              Comment


                #8
                Hello joeydisco,
                You have to create a multi-series indicator to this. Please refer to this help guide link which further discusses the multi-series concepts
                http://www.ninjatrader.com/support/h...nstruments.htm
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Is it not possible to do this by adding a condition to the strategy wizard?

                  i.e. If VIX index > 10 SMA
                  then Enter long position on stock X?

                  I'm not calculating any new values that Ninjatrader wouldn't already have access to so I imagine I wouldn't have to create a new indicator.
                  Last edited by joeydisco; 06-24-2012, 01:50 AM.

                  Comment


                    #10
                    Originally posted by joeydisco View Post
                    Is it not possible to do this by adding a condition to the strategy wizard?

                    i.e. If VIX index > 10 SMA
                    then Enter long position on stock X?

                    I'm not calculating any new values that Ninjatrader wouldn't already have access to so I imagine I wouldn't have to create a new indicator.
                    The VIX is a separate instrument to which you are referring in another instrument's chart. That makes it multi-instrument. So, no, you must use a multi-instrument strategy: you cannot do what you want to do, in the manner that you have asked.

                    Comment


                      #11
                      So can I create a multi-instrument strategy using the strategy analyzer or do I have to code something from scratch?

                      Thanks in advance.

                      Comment


                        #12
                        You have to do it with code.

                        Comment


                          #13
                          Hello joeydisco,
                          As Radical and koganam already mentioned, you have to code it via the NinjaScript editor. You cannot do it via the Strategy Wizard.

                          Thanks Radical and koganam for your inputs.
                          JoydeepNinjaTrader Customer Service

                          Comment


                            #14
                            VIX is not historical volatility

                            The VIX, nor ATR, are measures of historical volatility.

                            VIX = the implied volatility of S&P futures option prices
                            ATR = average true range

                            Historical volatility, or "statistical" volatility is an annualized measure of how much an instrument is likely to move up or down based on the standard deviation of an instruments daily returns over a certain lookback period.

                            Based on the formula here, you can create an indicator like so...

                            Code:
                            int _period = 100;
                            StdDev _stddev = null;
                            double _sqr254;
                            
                            protected override void OnBarUpdate()
                            {
                               if (CurrentBar <= _period) return;
                            			
                               if (_stddev == null)
                               {
                                  _stddev = StdDev(_period);
                                  _sqr254 = Math.Sqrt(254.0);
                               }
                            
                               double hv = _stddev[0] * _sqr254;
                               HV.Set(hv);
                            }
                            HV is a plot DataSeries

                            Comment


                              #15
                              I get an error when creating Historical Volatility indicator in NT7 provided by shodson. The error is "HV doesn't exist in actual context", code CS0103, line 55 corresponding to HV.Set(hv);
                              Any idea how can I correct this?
                              Is there a way to convert this indicator to NT8?
                              Thanks in advance

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ralett, Today, 11:52 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Started by rtwave, Yesterday, 07:06 PM
                              1 response
                              22 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by DTSSTS, Today, 11:27 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by siroya, Today, 10:02 AM
                              2 responses
                              9 views
                              0 likes
                              Last Post DTSSTS
                              by DTSSTS
                               
                              Started by pjsmith, Today, 10:50 AM
                              0 responses
                              10 views
                              0 likes
                              Last Post pjsmith
                              by pjsmith
                               
                              Working...
                              X