Convert to present value
Posted: Sun Apr 08, 2012 9:58 pm
This is a tool for converting past values to present.
For example, Oric 1 was being sold in 1983 for 169
pounds. What is the present value?
The user needs to define the inflation rate from
1950 to present in lines 20-80, to define the present
year in line 110 and the conversion ratio from local
currency to euro in case of eurozone country (line 10).
The following lines are for the UK. Data for the UK were
taken from http://www.whatsthecost.com/historic.cpi.aspx.
The data for France, Spain, Norway and Greece will be
provided shortly.
1 REM Local currency to euro in 10.
10 DATA 1
20 DATA 3.1,9.1,9.2,3.1,1.8
25 DATA 4.5,4.9,3.7,3,0.6
30 DATA 1,3.4,4.3,2,3.3
35 DATA 4.8,3.9,2.5,4.7,5.4
40 DATA 6.4,9.4,7.1,9.2,16
45 DATA 24.2,16.5,15.8,8.3,13.4
50 DATA 18,11.9,8.6,4.6,5
55 DATA 6.1,3.4,4.2,4.9,5.2
60 DATA 7,7.5,4.3,2.5,2
65 DATA 2.6,2.5,1.8,1.6,1.3
70 DATA 0.8,1.2,1.3,1.4,1.3
75 DATA 2.1,2.3,2.3,3.6,2.1
80 DATA 3.2,4.4,0,0,0
100 REM --------------------
110 EY=2012
115 DIM N(EY-1950)
120 READ RATIO
125 FOR I=1 TO EY-1950
130 READ N(I)
135 NEXT
140 INPUT "Amount of money"; MN
145 INPUT "Year (1950-present)"; YR
150 IF YR<1950 OR YR>EY THEN 145
155 FOR I=YR TO EY-1
160 MN = MN*(100+N(I-1950+1))/100
165 NEXT
170 IF YR<2002 THEN MN=MN/RATIO
180 PRINT "Present value is "MN
For example, Oric 1 was being sold in 1983 for 169
pounds. What is the present value?
The user needs to define the inflation rate from
1950 to present in lines 20-80, to define the present
year in line 110 and the conversion ratio from local
currency to euro in case of eurozone country (line 10).
The following lines are for the UK. Data for the UK were
taken from http://www.whatsthecost.com/historic.cpi.aspx.
The data for France, Spain, Norway and Greece will be
provided shortly.
1 REM Local currency to euro in 10.
10 DATA 1
20 DATA 3.1,9.1,9.2,3.1,1.8
25 DATA 4.5,4.9,3.7,3,0.6
30 DATA 1,3.4,4.3,2,3.3
35 DATA 4.8,3.9,2.5,4.7,5.4
40 DATA 6.4,9.4,7.1,9.2,16
45 DATA 24.2,16.5,15.8,8.3,13.4
50 DATA 18,11.9,8.6,4.6,5
55 DATA 6.1,3.4,4.2,4.9,5.2
60 DATA 7,7.5,4.3,2.5,2
65 DATA 2.6,2.5,1.8,1.6,1.3
70 DATA 0.8,1.2,1.3,1.4,1.3
75 DATA 2.1,2.3,2.3,3.6,2.1
80 DATA 3.2,4.4,0,0,0
100 REM --------------------
110 EY=2012
115 DIM N(EY-1950)
120 READ RATIO
125 FOR I=1 TO EY-1950
130 READ N(I)
135 NEXT
140 INPUT "Amount of money"; MN
145 INPUT "Year (1950-present)"; YR
150 IF YR<1950 OR YR>EY THEN 145
155 FOR I=YR TO EY-1
160 MN = MN*(100+N(I-1950+1))/100
165 NEXT
170 IF YR<2002 THEN MN=MN/RATIO
180 PRINT "Present value is "MN