Spsc documentation¶
TODOs¶
- Add annuity
- Add goal seek
- Add present time deposit
- Add faciltation of cost Funcs
- Add caching of output
- Add caching of input
- Need more test on primo.
CashflowCalculator¶
Inflation¶
- When calculating with inflation we should make a real rate
TimeSerieswhich indicates where the changes occur. - If any inflation is different from zero, it should change
FullTerm:ITermtoRealFullTerm:FullTermwhich includes both the real and nominal definitions. - It is important to use the same
IDiscountFactorsif possible, such to reuse both theIDateGeneratorand theDiscountFactorfrom the cache. - Real rates assume compounding rates. Which could possibly give problems. r_t : real rate pr. time t, p_t : inflation at time t and i_t : nominal rate pr. term t. $$ {r_t = \frac{i_t + 1}{p_t + 1}} $$
Present Time Deposit¶
A present time deposit is given as
var its = new PercentTimeSeries()
.WithPercent(Percent.FromPercent (3))
.Build();
var cfc = new CashflowCalculator.Builder()
//.WithInflationRates(its)
.WithRateCalculator(Implementations.RateCompoundToTerm)
.WithDiscountFactors(new DiscountFactorsRepository(its))
.Build()
.Calculate(
from: 1.Primo(2018),
to: 12.Ultimo(2018),
startBalance: new Payment(10000m,1.Primo(2017))
).ToList();