Data input

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

Data input

Serhat Güven
Hi everybody,

Does anyone knows the best method to input data to C++. I'm planning to read the data from a database via PHP and write it to a txt file and lastly let C++ read the text file but I think there must be a better way of handling data like directly reading the data from the database. Any ideas or best practices?

Regards,
s.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

USDMXN option

totalbull
Hello, I am very new to Quantlib; please forgive the elementary  
question:

I wish to price a foreign exchange option using the following data:

Currency: USDMXN
MXN interest rate: 8%
USD interest rate: 1%
USDMXN carry: 6.93%
Current USDMXN: 13.9
12m forward USDMXN (364 days): 14.863 (= 13.9*1.0693)
Strike: 14.863 (ie ATMF)
Maturity: 12m (364 days)
Option type: straddle (ie put = call pricing).
Vol: 25%

In addition I'd love to know, given the above, how to find out what  
the 10 delta or 25 delta strikes would be. I'm happy to use either  
quantlib itself, or preferably, in order to learn the structure of the  
classes, an example in quantlibXL.

Thanks in advance.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: USDMXN option

Thomas Browne-2
Is anybody able to help on this USDMXN option?


On 16 Apr 2009, at 21:40, [hidden email] wrote:

> Hello, I am very new to Quantlib; please forgive the elementary
> question:
>
> I wish to price a foreign exchange option using the following data:
>
> Currency: USDMXN
> MXN interest rate: 8%
> USD interest rate: 1%
> USDMXN carry: 6.93%
> Current USDMXN: 13.9
> 12m forward USDMXN (364 days): 14.863 (= 13.9*1.0693)
> Strike: 14.863 (ie ATMF)
> Maturity: 12m (364 days)
> Option type: straddle (ie put = call pricing).
> Vol: 25%
>
> In addition I'd love to know, given the above, how to find out what
> the 10 delta or 25 delta strikes would be. I'm happy to use either
> quantlib itself, or preferably, in order to learn the structure of the
> classes, an example in quantlibXL.
>
> Thanks in advance.
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: USDMXN option

Luigi Ballabio
In reply to this post by totalbull
On Thu, 2009-04-16 at 21:40 +0100, [hidden email] wrote:

> I wish to price a foreign exchange option using the following data:
>
> Currency: USDMXN
> MXN interest rate: 8%
> USD interest rate: 1%
> USDMXN carry: 6.93%
> Current USDMXN: 13.9
> 12m forward USDMXN (364 days): 14.863 (= 13.9*1.0693)
> Strike: 14.863 (ie ATMF)
> Maturity: 12m (364 days)
> Option type: straddle (ie put = call pricing).
> Vol: 25%

You can have a look at the EquityOption example and try to modify it to
suit your problem.  Instead of a BlackScholesMertonProcess with a
risk-free rate and a dividend rate, you'll have to use a
GarmanKohlagenProcess with a local and a foreign rate. For the straddle,
you'll have to create both the call and the put and add their two
values.


> In addition I'd love to know, given the above, how to find out what  
> the 10 delta or 25 delta strikes would be. I'm happy to use either  
> quantlib itself, or preferably, in order to learn the structure of the  
> classes, an example in quantlibXL.

No, I'm afraid I'll pass on this one.

Luigi



--

A debugged program is one for which you have not yet found the
conditions that make it fail.
-- Jerry Ogdin



------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: USDMXN option

totalbull
Thanks - will give it a bash. Thanks also to Bojan.

On 20 Apr 2009, at 16:18, Luigi Ballabio wrote:

> On Thu, 2009-04-16 at 21:40 +0100, [hidden email] wrote:
>> I wish to price a foreign exchange option using the following data:
>>
>> Currency: USDMXN
>> MXN interest rate: 8%
>> USD interest rate: 1%
>> USDMXN carry: 6.93%
>> Current USDMXN: 13.9
>> 12m forward USDMXN (364 days): 14.863 (= 13.9*1.0693)
>> Strike: 14.863 (ie ATMF)
>> Maturity: 12m (364 days)
>> Option type: straddle (ie put = call pricing).
>> Vol: 25%
>
> You can have a look at the EquityOption example and try to modify it  
> to
> suit your problem.  Instead of a BlackScholesMertonProcess with a
> risk-free rate and a dividend rate, you'll have to use a
> GarmanKohlagenProcess with a local and a foreign rate. For the  
> straddle,
> you'll have to create both the call and the put and add their two
> values.
>
>
>> In addition I'd love to know, given the above, how to find out what
>> the 10 delta or 25 delta strikes would be. I'm happy to use either
>> quantlib itself, or preferably, in order to learn the structure of  
>> the
>> classes, an example in quantlibXL.
>
> No, I'm afraid I'll pass on this one.
>
> Luigi
>
>
>
> --
>
> A debugged program is one for which you have not yet found the
> conditions that make it fail.
> -- Jerry Ogdin
>
>


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users