Duration Type in Python

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

Duration Type in Python

John Orford
Hey Guys,

I am trying to use the CashFlows.duration() function.

Can't figure out what the required Duration::Type input should look like in Python code however.

I tried multiple variations, can't hit on the right thing.

Can anyone provide an example?

Thanks,

John


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Duration Type in Python

Luigi Ballabio
You can use Duration.Simple, Duration.Modified etc. In general, the
scope operator :: in C++ (as in Duration::Simple) translates to a dot
in Python.

Luigi


On Tue, Jul 8, 2014 at 12:01 PM, John Orford <[hidden email]> wrote:

> Hey Guys,
>
> I am trying to use the CashFlows.duration() function.
>
> Can't figure out what the required Duration::Type input should look like in
> Python code however.
>
> I tried multiple variations, can't hit on the right thing.
>
> Can anyone provide an example?
>
> Thanks,
>
> John
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Duration Type in Python

John Orford
Great!  I'll keep that convention in mind.

On Tuesday, 8 July 2014, Luigi Ballabio <[hidden email]> wrote:
You can use Duration.Simple, Duration.Modified etc. In general, the
scope operator :: in C++ (as in Duration::Simple) translates to a dot
in Python.

Luigi


On Tue, Jul 8, 2014 at 12:01 PM, John Orford <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;john.orford@gmail.com&#39;)">john.orford@...> wrote:
> Hey Guys,
>
> I am trying to use the CashFlows.duration() function.
>
> Can't figure out what the required Duration::Type input should look like in
> Python code however.
>
> I tried multiple variations, can't hit on the right thing.
>
> Can anyone provide an example?
>
> Thanks,
>
> John
>
>
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> QuantLib-users mailing list
> <a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;QuantLib-users@lists.sourceforge.net&#39;)">QuantLib-users@...
> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>



--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users