Loading [MathJax]/extensions/tex2jax.js
MRFFL: MR Fortran Finance Library 2024-12-28
Computational Tools For Finance
All Namespaces Files Functions Variables
mrffl_var_sets.f90
Go to the documentation of this file.
1! -*- Mode:F90; Coding:us-ascii-unix; fill-column:129 -*-
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.H.S.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.H.E.!!
3!>
4!! @file mrffl_var_sets.f90
5!! @author Mitch Richling http://www.mitchr.me/
6!! @date 2025-01-02
7!! @brief Constants to to identify TVM variables.@EOL
8!! @keywords finance fortran monte carlo inflation cashflow time value of money tvm percentages taxes stock market
9!! @std F2023
10!! @see https://github.com/richmit/FortranFinance
11!! @copyright
12!! @parblock
13!! Copyright (c) 2025, Mitchell Jay Richling <http://www.mitchr.me/> All rights reserved.
14!!
15!! Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
16!! conditions are met:
17!!
18!! 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following
19!! disclaimer.
20!!
21!! 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following
22!! disclaimer in the documentation and/or other materials provided with the distribution.
23!!
24!! 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products
25!! derived from this software without specific prior written permission.
26!!
27!! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
28!! INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29!! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30!! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
31!! USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32!! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33!! OF THE POSSIBILITY OF SUCH DAMAGE.
34!! @endparblock
35!!
36
37!----------------------------------------------------------------------------------------------------------------------------------
38!> Constants to to identify TVM variables.
40 use mrffl_config, only: ik=>mrfflik
41 implicit none
42 private
43
44 integer(kind=ik), parameter, public :: var_none = 0 !< No variables in set
45 integer(kind=ik), parameter, public :: var_a = 1 !< First annuity payment
46 integer(kind=ik), parameter, public :: var_p = 2 !< Principal
47 integer(kind=ik), parameter, public :: var_i = 4 !< Interest/rate (First rate for geometric annuity)
48 integer(kind=ik), parameter, public :: var_g = 8 !< Second Interest/rate (for geometric annuity)
49 integer(kind=ik), parameter, public :: var_n = 16 !< Number of periods
50 integer(kind=ik), parameter, public :: var_pv = 32 !< Present value
51 integer(kind=ik), parameter, public :: var_fv = 64 !< Future value
52 integer(kind=ik), parameter, public :: var_d = 128 !< Delayed start
53 integer(kind=ik), parameter, public :: var_e = 256 !< Early end for annuities
54 integer(kind=ik), parameter, public :: var_q = 512 !< Growth rate for arithmatic annuities
55 integer(kind=ik), parameter, public :: var_pmt = 1024 !< Currently this is only used by the tvm12 module
56
57end module mrffl_var_sets
Configuration for MRFFL (MR Fortran Finance Library).
integer, parameter, public mrfflik
Integer kinds used in interfaces.
Constants to to identify TVM variables.
integer(kind=ik), parameter, public var_pv
Present value.
integer(kind=ik), parameter, public var_e
Early end for annuities.
integer(kind=ik), parameter, public var_fv
Future value.
integer(kind=ik), parameter, public var_n
Number of periods.
integer(kind=ik), parameter, public var_a
First annuity payment.
integer(kind=ik), parameter, public var_none
No variables in set.
integer(kind=ik), parameter, public var_pmt
Currently this is only used by the tvm12 module.
integer(kind=ik), parameter, public var_i
Interest/rate (First rate for geometric annuity)
integer(kind=ik), parameter, public var_d
Delayed start.
integer(kind=ik), parameter, public var_q
Growth rate for arithmatic annuities.
integer(kind=ik), parameter, public var_g
Second Interest/rate (for geometric annuity)
integer(kind=ik), parameter, public var_p
Principal.