Volatility of a stock

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Volatility of a stock

MC-21
I am a new quantlib user, so please excuse me for my naive question.
Is their a way in quantlib to calculate historical volatility?
I know I can easily calculate variance in my C++ code but I just wanted to know If given a time series of historic stock prices is their a way to calculate historic volatility and return.

Thanks!



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Volatility of a stock

Luigi Ballabio
On Fri, 2009-02-20 at 12:52 -0600, MC wrote:
> I am a new quantlib user, so please excuse me for my naive question.
> Is their a way in quantlib to calculate historical volatility?
> I know I can easily calculate variance in my C++ code but I just
> wanted to know If given a time series of historic stock prices is
> their a way to calculate historic volatility and return.

Not directly.  You can use the statistics classes in
<ql/math/statistics> to build a solution.

Luigi


--

All parts should go together without forcing. You must remember that
the parts you are reassembling were disassembled by you. Therefore, if
you can't get them together again, there must be a reason. By all
means, do not use a hammer.
-- IBM maintenance manual, 1925



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users