# Meglio lasciare le funzioni semplici:
# Bond puo' essere tranquillamente una struttura dati
# pero' meglio passare tempo e cash flow come vettori separati
#
# I risultati poi come semplice
# bond_price(seq(0.5,2,by=0.5), c(.1,.1,.1,1), tsi)
# Price
bond_price<-function(t, cf, TS){
sum(get_df(TS, t) * cf)
}
# Duration
# Convexity
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.