C# examples?

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

C# examples?

Giles Thomas
Hi,

I'm new to QuantLib and I was wondering if there are any really simple
examples of using it with C# that I could follow.

Here's the background - my company has a new product, a mixture of a
spreadsheet and a programming environment, targetted at financial
users.  Its big selling point is that it blurs the line between .NET
programming and writing spreadsheets, and one real advantage I would
like to show as a result of this is easy integration with existing
quantitative libraries - QuantLib being the obvious choice.

So far we've been able to build QuantLib and wrap it in the appropriate
SWIG layer so that we can create its objects from C#.  What we'd really
like to do now is take a simple example and convert it over to our
system, but all of the examples we have been able to find have been
C++.  Obviously, we can try to convert these over, but if there are any
simple C# examples out there it would probably save us a fair amount of
work - so any help would be much appreciated!


Best regards, and thanks in advance,

Giles

--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[hidden email]
+44 (0) 20 7253 6372

Try out our beta! <http://www.resolversystems.com/download/>
(Free registration required)

17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# examples?

Tito Ingargiola
Take a look in QuantLib-SWIG/CSharp/examples for c# examples, but all of the non-C++ examples in the SWIG distribution should be doable in c# as well.

Giles Thomas <[hidden email]> wrote:
Hi,

I'm new to QuantLib and I was wondering if there are any really simple
examples of using it with C# that I could follow.

Here's the background - my company has a new product, a mixture of a
spreadsheet and a programming environment, targetted at financial
users. Its big selling point is that it blurs the line between .NET
programming and writing spreadsheets, and one real advantage I would
like to show as a result of this is easy integration with existing
quantitative libraries - QuantLib being the obvious choice.

So far we've been able to build QuantLib and wrap it in the appropriate
SWIG layer so that we can create its objects from C#. What we'd really
like to do now is take a simple example and convert it over to our
system, but all of the examples we have been able to find have been
C++. Obviously, we can try to convert these over, but if there are any
simple C# examples out there it would probably save us a fair amount of
work - so any help would be much appreciated!


Best regards, and thanks in advance,

Giles

--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[hidden email]
+44 (0) 20 7253 6372

Try out our beta!
(Free registration required)

17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# examples?

Giles Thomas
Many thanks, Tito.  The version I have (0.8.0) has just one example in
C#, a Bermudan Swaption - but I'll take a look at the ones in the other
languages and see if I can translate them.

If I get anything useful out of the exercise, is there anywhere that I
could usefully post the resulting C# code to help other people?


Regards,

Giles


Tito Ingargiola wrote:

> Take a look in QuantLib-SWIG/CSharp/examples for c# examples, but all
> of the non-C++ examples in the SWIG distribution should be doable in
> c# as well.
>
> */Giles Thomas <[hidden email]>/* wrote:
>
>     Hi,
>
>     I'm new to QuantLib and I was wondering if there are any really
>     simple
>     examples of using it with C# that I could follow.
>
>     Here's the background - my company has a new product, a mixture of a
>     spreadsheet and a programming environment, targetted at financial
>     users. Its big selling point is that it blurs the line between .NET
>     programming and writing spreadsheets, and one real advantage I would
>     like to show as a result of this is easy integration with existing
>     quantitative libraries - QuantLib being the obvious choice.
>
>     So far we've been able to build QuantLib and wrap it in the
>     appropriate
>     SWIG layer so that we can create its objects from C#. What we'd
>     really
>     like to do now is take a simple example and convert it over to our
>     system, but all of the examples we have been able to find have been
>     C++. Obviously, we can try to convert these over, but if there are
>     any
>     simple C# examples out there it would probably save us a fair
>     amount of
>     work - so any help would be much appreciated!
>
>
>     Best regards, and thanks in advance,
>
>     Giles
>
>     --
>     Giles Thomas
>     MD & CTO, Resolver Systems Ltd.
>     [hidden email]
>     +44 (0) 20 7253 6372
>
>     Try out our beta!
>     (Free registration required)
>
>     17a Clerkenwell Road, London EC1M 5RD, UK
>     VAT No.: GB 893 5643 79
>     Registered in England and Wales as company number 5467329.
>     Registered address: 843 Finchley Road, London NW11 8NA, UK
>
>
>     -------------------------------------------------------------------------
>     This SF.net email is sponsored by: Microsoft
>     Defy all challenges. Microsoft(R) Visual Studio 2005.
>     http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>     _______________________________________________
>     QuantLib-users mailing list
>     [hidden email]
>     https://lists.sourceforge.net/lists/listinfo/quantlib-users
>
>


--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[hidden email]
+44 (0) 20 7253 6372

Try out our beta! <http://www.resolversystems.com/download/>
(Free registration required)

17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# examples?

Luigi Ballabio
On Mon, 2007-12-31 at 17:18 +0000, Giles Thomas wrote:
> Many thanks, Tito.  The version I have (0.8.0) has just one example in
> C#, a Bermudan Swaption - but I'll take a look at the ones in the other
> languages and see if I can translate them.

Hi Giles,
        the recently released version 0.9.0 has EquityOption as well (although
you'll need a compiler that supports C# 2.0 to use it---Visual C# 7
won't work.)


> If I get anything useful out of the exercise, is there anywhere that I
> could usefully post the resulting C# code to help other people?

You can post them here. I'll be happy to add them to the main
repository.

Luigi


--

Blessed is the man who, having nothing to say, abstains from giving
wordy evidence of the fact.
-- George Eliot



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# examples?

Tito Ingargiola

Hi Luigi,

I had posted, to the dev list, a complete java implementation of the discrete hedging example, including the necessary swig changes back around xmas.   Should I have also put a task or somesuch into the sourceforge repository to get it 'promoted'?  I'm familiar with cvs & svn but not with sourceforge, but I can see that the changes haven't made it into the repository.  Please let me know how I can promote such changes as I continue to make changes to the swig files to access functionality within quantlib from java (as my platform is java-based).  Thanks for the clarification as I hope someone will find some changes or examples I might provide useful.  Regards,

    Tito.


Luigi Ballabio <[hidden email]> wrote:
On Mon, 2007-12-31 at 17:18 +0000, Giles Thomas wrote:
> Many thanks, Tito. The version I have (0.8.0) has just one example in
> C#, a Bermudan Swaption - but I'll take a look at the ones in the other
> languages and see if I can translate them.

Hi Giles,
the recently released version 0.9.0 has EquityOption as well (although
you'll need a compiler that supports C# 2.0 to use it---Visual C# 7
won't work.)


> If I get anything useful out of the exercise, is there anywhere that I
> could usefully post the resulting C# code to help other people?

You can post them here. I'll be happy to add them to the main
repository.

Luigi


--

Blessed is the man who, having nothing to say, abstains from giving
wordy evidence of the fact.
-- George Eliot




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: C# examples?

Luigi Ballabio

On Jan 24, 2008, at 5:38 PM, Tito Ingargiola wrote:
> I had posted, to the dev list, a complete java implementation of the
> discrete hedging example, including the necessary swig changes back
> around xmas.   Should I have also put a task or somesuch into the
> sourceforge repository to get it 'promoted'?

Hi Tito,
        no, there's no need for that. I have your contribution, but I just
haven't found the time to commit it yet. It has not been forgotten.

Later,
        Luigi


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users