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.


    The ATR indicator comes natively in NinjaTrader.


    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:



      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
        CME Group is the world's leading and most diverse derivatives marketplace offering the widest range of futures and options products for risk management.


        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:



            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
                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, 02: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 GLFX005, Today, 03:23 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post GLFX005
                              by GLFX005
                               
                              Started by XXtrader, Yesterday, 11:30 PM
                              2 responses
                              11 views
                              0 likes
                              Last Post XXtrader  
                              Started by Waxavi, Today, 02:10 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post Waxavi
                              by Waxavi
                               
                              Started by TradeForge, Today, 02:09 AM
                              0 responses
                              14 views
                              0 likes
                              Last Post TradeForge  
                              Started by Waxavi, Today, 02:00 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post Waxavi
                              by Waxavi
                               
                              Working...
                              X