Script:
~addons/finance/finrxec/basicfinance/timeline.ijs
Contributor: William Szuch
Updated: 2022 6 25
Depend: ~addons/graphics/plot/plot.ijs
Definitions: loaded to locale base
Status: done
Show the cash flow as a time line plot at the
periods when the cash
flow occurred from a reference point of period equal to 0.
As a convention the cash inflow to a portfolio is positive
Script source:
timeline.ijs
plot not working properly with level cash flow
with type stick.
type stick’ plot 5 # 2
Definitions
timelinecf (monad)
Type: explicit
Depend: plotdef/plot
Show the cash flow as a time line plot.
Syntax
timelinecf(T;C)
T = list of periods measured in time units from
an
origin (ie: 0) at which the cash flow occurred
C = the amout of cash flow at each period in the
list of periods in T
Example
timelinecf(0 1 2 3 4;1 2 3 4 5)
timelinecf(_3 _2 _1 0 1 2 3 ;1 2 3 4 5 _6 7)
timelinecf(0 1 2 3 4 5.5 3.3 0.5 _1;1 2 3 _4 5 _6 7 8 9)
timelinecf((i. 25);100, - 24 #10)
timelinecf(0 1 2 3 4;3 4 5) NB. (T;C) do not match