[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Problem plotting an array



PureBytes Links

Trading Reference Links



I guess I'm not seeing why this shouldn't produce results like a stdev of any other array. I've tried modifying it a few different ways but the resulting plot line is still flat. However if I change the horizontal scaling to be very narrow (showing only 4 months instead of 2 years) then the volatility line changes to positive values. Why is this the case?


From: Potato Soup <potatosoupz@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sun, November 15, 2009 9:36:51 AM
Subject: Re: [amibroker] Problem plotting an array



I tried that, but volatility still remained at 0. Any other suggestions?


From: Anthony Faragasso <ajf1111@xxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sun, November 15, 2009 7:00:09 AM
Subject: Re: [amibroker] Problem plotting an array



Correction....the volatility is at the bottom of the graph...
 
I believe you should not match the periods of correlation and volatility...the volatility output remains at 0.
 
if you increase your correlation period to something like 180 days and historical volatility to 20 you should
see volatility register...
 
 
----- Original Message -----
Sent: Sunday, November 15, 2009 6:45 AM
Subject: Re: [amibroker] Problem plotting an array

 

Is your instrument1 variable enclosed in ""   ?

Do you have period1 defined.?

I ran the below script and it workd..

 

Period1=10;

t1 = Correlation( Foreign("GR", "Close"), Foreign("F", "Close"), Period1);

Plot(t1, "Correlation", colorYellow);

hv1 = StDev(log(t1/Ref(t1,-1)),Period1)*sqrt(260);

Plot(hv1,"Volatility", colorWhite,styleLine|styleOwnScale);

----- Original Message -----
Sent: Sunday, November 15, 2009 3:17 AM
Subject: [amibroker] Problem plotting an array

 

I have a simple script that calculates the correlation between two instruments. I then take the code we've been discussing for historical volatility, and try to plot the volatility of the correlation. However the second plot function of the volatility just shows a flat line at 0. Any ideas what I'm missing here?

    t1 = Correlation( Foreign(instrument1 , "Close"), Foreign(instrument2 , "Close"), period1);
    Plot(t1, "Correlation" , colorYellow) ;

    hv1 = StDev(log(t1/ Ref(t1,-1) ),period1) *sqrt(260) ;
    Plot(hv1,"Volatilit y", colorWhite,styleLin e|styleOwnScale) ;









__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___