This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Nov 25, 2011 | |
@author: tlmaloney | |
''' | |
class Agent(object): | |
''' | |
An Agent has a name and Unique ID. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Nov 25, 2011 | |
@author: tlmaloney | |
''' | |
class Market(object): | |
''' | |
A market provides information about observables, like Assets, Prices, | |
Agents, DiscountFactorCurves, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Nov 26, 2011 | |
@author: tlmaloney | |
''' | |
import Payment | |
class Price(object): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Nov 25, 2011 | |
@author: tlmaloney | |
''' | |
class Payment(object): | |
''' | |
A payment is the transfer of ownership and possession of an amount of asset from Agent A to | |
Agent B on a specific date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on Dec 8, 2011 | |
@author: tlmaloney | |
''' | |
import Asset | |
class Annuity(Asset.Asset): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* func_names.cpp | |
* | |
* Created on: Dec 1, 2011 | |
* Author: tlmaloney | |
*/ | |
#include "func_names.h" | |
// boundary condition along tau_final |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InterestPayment(SeriesPayment): | |
""" One of a series of rate-based payments """ | |
def __init__(self, rate_level_model, measure, period, inception_date, payment_date, | |
interest, asset_id, name, description): | |
SeriesPayment.__init__(self, inception_date, payment_date, interest, | |
asset_id, name, description) | |
self.rate_level_model = rate_level_model | |
self.measure = measure | |
self.period = period |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rate(object): | |
''' Abstract concept of a market rate ''' | |
def __init__(self, level, measure, periods): | |
"""Constructor | |
Keyword arguments: | |
level -- Float, the rate level (e.g. 0.05 means 5%) | |
measure -- Measure | |
periods -- Integer, the number of times the rate compounds in a year |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DateMeasure(object): | |
"""An abstract base class for date measures""" | |
name = None | |
def measure_time(self, date, schedule): | |
'''Returns a measure of time between date and | |
schedule.prev_date(date) | |
Keyword arguments: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
:Name: DateMeasureKit | |
:Descr: The way we make calculations based on the number of days between two dates | |
:Synopsis: Contains a set of conventions for determining the day-count between two dates. Finds both the number of days between two dates and the corresponding day count factor. | |
:Author: dpollini | |
tmaloney |
OlderNewer