MRFFL: MR Fortran Finance Library 2024-12-28
Computational Tools For Finance
|
US inflation data and monte carlo. More...
Functions/Subroutines | |
real(kind=rk) pure function, public | inf_aggregate (from_year, to_year) |
Aggregate inflation rate between two years. | |
real(kind=rk) pure function, public | inf_adj (from_year, to_year, v) |
Adjust value for inflation from_year to to_year using US inflation data. | |
real(kind=rk) function, public | inf_resample (history_years) |
Return a random inflation value from the last history_years of US inflation data. | |
Variables | |
real(kind=rk), dimension(1914:2023), parameter, public | inf_dat = [ 1.0, 1.0, 7.9, 17.4, 18.0, 14.6, 15.6, -10.5, -6.1, 1.8, 0.0, 2.3, 1.1, -1.7, -1.7, 0.0, -2.3, -9.0, -9.9, -5.1, 3.1, 2.2, 1.5, 3.6, -2.1, -1.4, 0.7, 5.0, 10.9, 6.1, 1.7, 2.3, 8.3, 14.4, 8.1, -1.2, 1.3, 7.9, 1.9, 0.8, 0.7, -0.4, 1.5, 3.3, 2.8, 0.7, 1.7, 1.0, 1.0, 1.3, 1.3, 1.6, 2.9, 3.1, 4.2, 5.5, 5.7, 4.4, 3.2, 6.2, 11.0, 9.1, 5.8, 6.5, 7.6, 11.3, 13.5, 10.3, 6.2, 3.2, 4.3, 3.6, 1.9, 3.6, 4.1, 4.8, 5.4, 4.2, 3.0, 3.0, 2.6, 2.8, 3.0, 2.3, 1.6, 2.2, 3.4, 2.8, 1.6, 2.3, 2.7, 3.4, 3.2, 2.8, 3.8, -0.4, 1.6, 3.2, 2.1, 1.5, 1.6, 0.1, 1.3, 2.1, 2.4, 1.8, 1.2, 4.7, 8.0, 4.1] |
US inflation data and monte carlo.
real(kind=rk) pure function, public mrffl_us_inflation::inf_aggregate | ( | integer(kind=ik), intent(in) | from_year, |
integer(kind=ik), intent(in) | to_year ) |
Aggregate inflation rate between two years.
Out of range years cause an ERROR STOP.
Definition at line 68 of file mrffl_us_inflation.f90.
References inf_aggregate(), inf_dat, mrffl_percentages::percentage_change(), and mrffl_percentages::percentage_of().
Referenced by inf_adj(), and inf_aggregate().
real(kind=rk) pure function, public mrffl_us_inflation::inf_adj | ( | integer(kind=ik), intent(in) | from_year, |
integer(kind=ik), intent(in) | to_year, | ||
real(kind=rk), intent(in) | v ) |
Adjust value for inflation from_year to to_year using US inflation data.
Out of range years cause an ERROR STOP.
Definition at line 91 of file mrffl_us_inflation.f90.
References mrffl_percentages::add_percentage(), inf_adj(), and inf_aggregate().
Referenced by inf_adj().
real(kind=rk) function, public mrffl_us_inflation::inf_resample | ( | integer(kind=ik), intent(in) | history_years | ) |
Return a random inflation value from the last history_years of US inflation data.
Definition at line 101 of file mrffl_us_inflation.f90.
References inf_dat, inf_resample(), and mrffl_stats::resample_tail().
Referenced by inf_resample().
real(kind=rk), dimension(1914:2023), parameter, public mrffl_us_inflation::inf_dat = [ 1.0, 1.0, 7.9, 17.4, 18.0, 14.6, 15.6, -10.5, -6.1, 1.8, 0.0, 2.3, 1.1, -1.7, -1.7, 0.0, -2.3, -9.0, -9.9, -5.1, 3.1, 2.2, 1.5, 3.6, -2.1, -1.4, 0.7, 5.0, 10.9, 6.1, 1.7, 2.3, 8.3, 14.4, 8.1, -1.2, 1.3, 7.9, 1.9, 0.8, 0.7, -0.4, 1.5, 3.3, 2.8, 0.7, 1.7, 1.0, 1.0, 1.3, 1.3, 1.6, 2.9, 3.1, 4.2, 5.5, 5.7, 4.4, 3.2, 6.2, 11.0, 9.1, 5.8, 6.5, 7.6, 11.3, 13.5, 10.3, 6.2, 3.2, 4.3, 3.6, 1.9, 3.6, 4.1, 4.8, 5.4, 4.2, 3.0, 3.0, 2.6, 2.8, 3.0, 2.3, 1.6, 2.2, 3.4, 2.8, 1.6, 2.3, 2.7, 3.4, 3.2, 2.8, 3.8, -0.4, 1.6, 3.2, 2.1, 1.5, 1.6, 0.1, 1.3, 2.1, 2.4, 1.8, 1.2, 4.7, 8.0, 4.1] |
Definition at line 46 of file mrffl_us_inflation.f90.
Referenced by inf_aggregate(), and inf_resample().