
P1: JYS
c12 JWBK378-Fletcher May 28, 2009 10:59 Printer: Yet to come
178 Financial Modelling in Python
self
, tag
, start
, end
, roll
period
, roll
duration
, reset
period
, reset
duration
, reset
currency
, reset
basis
, reset
shift method):
try:
observables = \
ppf.core.generate
libor observables(
start=utils.to
ppf date(start)
, end=utils.to
ppf date(end)
, roll
period=roll period
, roll
duration = eval("ppf.date time."+roll duration)
, reset
period = reset period
, reset
duration = eval("ppf.date time."+reset duration)
, tenor
period = reset period
, tenor
duration = eval("ppf.date time."+reset duration)
, reset
currency=reset currency
, reset
basis = eval("ppf.date time."+reset basis)
, reset
shift method=eval( \
"ppf.date
time.shift convention."+reset shift method)
, reset
lag = 0)
TradeServer.
observables[tag] = observables
return tag
except RuntimeError, e: utils.raise
com exception(e)
def GenerateFlows(
self
, tag
, start
, end
, period
, duration
, pay
currency
, pay
shift method
, accrual
basis
, observables):
try:
flows = ppf.core.generate
flows(
start=utils.to
ppf date(start)
, end=utils.to
ppf date(end)
, duration=eval("ppf.date
time."+duration)
, period=period
, pay
shift method=eval(\
"ppf.date
time.shift convention."+pay shift method)
, pay
currency=pay currency