File:Rusa2014.10.28t.jpg

Example of the use of the linear approximation and the linear extrapolation.

Explicit plot of price of the Russian Ruble evaluated in the USA pennies (cents) versus time, thick green line; the linear approximation extrapolated a year ahead, straight black line.

Data are loaded from Mataf for the state of 27 Oct 2014, and used to draw the linear approximation. .

The price of thousnad roubles, expressed in dollars, versus time is shown in the figure at right for the larger period of time, from the same source.

Since that time, the data (and thick green line) were updated few times; but the linear approximation (straight black line) is not updated, it is the same.

Description
The course of dollar in roubles is recalculated to price of rubble in the American pennies, id est, the cents of the USA dollar. This quantity refers to the ordinate axis.

The abscissa has sense of time; it is measured in days sine the preparation of the approximaiton (2014.10.27), and this date corresponds to zero at the abscissa axis. The first version is loaded 2014.10.28; then new data are added. The original data extend to the time $t=-120$ days; these data are shown with thick green line. More data are added, but the black line remains the same, this is linear extrapolation of data with non–positive values of time $t$.

The black straight line refers to the linear approximation; it means the very brave extrapolation. Usually, such a far extrapolations show strong deviation from the real data.

The linear extrapolation predicts, that the price of rouble drops to zero within 500 days since beginning of the observation, id est, this may happen in 2016. It will be interesting to see, how soon the deviation from the black straight line becomes larger, than the width of the green experimental curve. At the moment of loading, the experimental data are not yet known, so, the test of the linear approximation is methodically clean and corresponds to the TORI axioms.

The scientific question is, will the rouble (Id est, the continuation of the green line) jump above the straight black line or not; and if it will, how soon may it happen. Some links are collected at the bottom; they refer to the conditions that might lead to strong reduction of value of rouble, and, indeed, the data for beginning of 2014 November are well below the linear approximation.

The honest use is assumed, the source should be attributed.

Data loaded
The data below should be stored as dollardata.txt in order to run the code of the next section 31 2014-11-27.31  47 359.80 2014-11-26.30   46 663.40 2014-11-25.29   45 292.32 2014-11-24.28   44 380.80 2014-11-23.27   45 772.90 2014-11-22.26   45 772.90 2014-11-21.25   45 481.20 2014-11-20.24   46 670.90 2014-11-19.23   46 965.50 2014-11-18.22   46 630.00 2014-11-17      47 392.50 2014-11-16      47 241.64 2014-11-15      47 346.0 2014-11-14      47 428.5 2014-11-13      46 284.5 2014-11-12      46 408.0 2014-11-11      46 143.70 2014-11-10      45 713.8 2014-11-09      46 610.9 2014-11-08      46 699.9 2014-11-07      47 937.0 2014-11-06      45 367.20 2014-11-05      44 531.6 2014-11-04      43 605.6 2014-11-03      43 359.8 2014-11-02      43 028.3 2014-11-01      43 028.3 2014-10-31      41 701.1 2014-10-30      43 388.0 2014-10-29      42 750.5 2014-10-28      42 403.5 2014-10-27      41 984.50 2014-10-26      41 895.20 2014-10-25      41 895.20 2014-10-24      41 926.50 2014-10-23      41 539.70 2014-10-22      41 000.30 2014-10-21      40 970.30 2014-10-20      40 934.30 2014-10-19      40 717.90 2014-10-18      40 717.90 2014-10-17      39 889.10 2014-10-16      39 889.10 2014-10-15      39 889.10 2014-10-14      39 889.10 2014-10-13      39 889.10 2014-10-12      39 889.10 2014-10-11      39 889.10 2014-10-10      39 889.10 2014-10-09      39 889.10 2014-10-08      39 889.10 2014-10-07      39 889.10 2014-10-06      39 975.10 2014-10-05      39 980.70 2014-10-04      39 571.00 2014-10-03      39 571.00 2014-10-02      39 571.00 2014-10-01      39 685.50 2014-09-30      39 431.50 2014-09-29      39 143.50 2014-09-28      39 152.70 2014-09-27      39 152.70 2014-09-26      38 494.80 2014-09-25      38 206.50 2014-09-24      38 581.00 2014-09-23      38 731.10 2014-09-22      38 432.20 2014-09-21      38 435.60 2014-09-20      38 435.60 2014-09-19      38 477.30 2014-09-18      38 432.90 2014-09-17      38 336.40 2014-09-16      38 302.80 2014-09-15      37 793.80 2014-09-14      37 785.30 2014-09-13      37 785.30 2014-09-12      37 532.40 2014-09-11      37 310.80 2014-09-10      37 093.10 2014-09-09      37 046.50 2014-09-08      36 975.80 2014-09-07      36 945.60 2014-09-06      36 945.60 2014-09-05      36 958.60 2014-09-04      36 806.70 2014-09-03      37 453.60 2014-09-02      37 328.10 2014-09-01      37 057.80 2014-08-31      37 068.00 2014-08-30      37 068.00 2014-08-29      36 754.00 2014-08-28      35 937.50 2014-08-27      36 164.90 2014-08-26      36 146.10 2014-08-25      36 141.30 2014-08-24      36 112.70 2014-08-23      36 112.70 2014-08-22      36 047.10 2014-08-21      36 367.10 2014-08-20      36 182.00 2014-08-19      36 082.10 2014-08-18      36 113.90 2014-08-17      36 127.70 2014-08-16      36 127.70 2014-08-15      36 029.60 2014-08-14      36 043.80 2014-08-13      36 213.10 2014-08-12      35 947.10 2014-08-11      36 148.90 2014-08-10      36 149.10 2014-08-09      36 149.10 2014-08-08      36 361.00 2014-08-07      36 174.10 2014-08-06      36 100.30 2014-08-05      35 831.90 2014-08-04      35 761.40 2014-08-03      35 753.90 2014-08-02      35 753.90 2014-08-01      35 728.90 2014-07-31      35 558.70 2014-07-30      35 813.00 2014-07-29      35 559.30 2014-07-28      35 115.30 2014-07-27      35 128.60 2014-07-26      35 128.60 2014-07-25      35 083.80 2014-07-24      34 879.80 2014-07-23      34 984.80 2014-07-22      35 170.30 2014-07-21      35 317.80 2014-07-20      35 317.80 2014-07-19      35 158.60 2014-07-18      35 266.00 2014-07-17      34 486.00 2014-07-16      34 399.30 2014-07-15      34 344.90 2014-07-14      34 199.50 2014-07-13      34 116.30 2014-07-12      34 116.30 2014-07-11      34 012.70 2014-07-10      33 918.00 2014-07-09      34 231.20 2014-07-08      34 432.30 2014-07-07      34 387.40 2014-07-06      34 404.20 2014-07-05      34 404.20 2014-07-04      34 305.50 2014-07-03      34 304.00 2014-07-02      34 355.00 2014-07-01      33 985.80 2014-06-30      33 722.00 2014-06-29      33 744.70 2014-06-28      33 744.70 2014-06-27      33 742.80 2014-06-26      33 634.60 2014-06-25      33 737.20 2014-06-24      33 791.70 2014-06-23      34 091.20 2014-06-22      34 462.20 2014-06-21      34 462.20 2014-06-20      34 475.00 2014-06-19      34 416.90 2014-06-18      34 455.40 2014-06-17      34 811.00 2014-06-16      34 602.60 2014-06-15      34 394.80 2014-06-14      34 394.80 2014-06-13      34 390.20 2014-06-12      34 344.60 2014-06-11      34 354.90 2014-06-10      34 289.80 2014-06-09      34 336.40 2014-06-08      34 409.70 2014-06-07      34 409.70 2014-06-06      34 407.30 2014-06-05      34 694.70 2014-06-04      34 970.60 2014-06-03      35 075.60 2014-06-02      35 043.00 2014-06-01      34 891.40 2014-05-31      34 891.40

The maximum was reached on 27 Oct 2014 1 000.00 US Dollar = 41 984.50 Russian Ruble The minimum on 22 Feb 2009 1 000.00 US Dollar = 27.60 Russian Ruble https://www.mataf.net/en/currency/converter-USD-RUB

C++ generator of lines
Files ado.cin and dollardata.txt from the previous section should be loaded in order to compile and run the code below

FILE *i,*o; int main{ int j,n,m,N=200; char d[N][16]; DB f[N]; int di; DB dr; int day; //i=fopen("rusa2014.10.29.txt","r"); i=fopen("dollardata.txt","r"); //i=fopen("04.txt","r"); fscanf(i,"%d",&day);
 * 1) include
 * 2) include
 * 3) include
 * 4) define DB double
 * 5) define DO(x,y) for(x=0;x<y;x++)
 * 6) include"ado.cin"

DO(n,N) { j=fscanf(i,"%s%d%lf",d[n],&di,&dr); if(j<3) goto end; f[n]=di+.001*dr; printf("%1d %3d %s %2d %8.3lf %4d %6.4lf %6.4lf\n",j,n,d[n],di,dr,day-n,f[n],1000./f[n]); } end: N=n; fclose(i);

//o=fopen("05.eps","w"); //o=fopen("rusa2014m10m29.eps","w"); o=fopen("dollarplot.eps","w"); ado(o,720,320); fprintf(o,"210 10 translate 10 10 scale\n"); for(n=0;n<31;n+=10) {M(-20,n)L(50,n)} for(n=-20;n<51;n+=10) {M(n,0)L(n,30)} fprintf(o,"0 0 0 RGB 2 setlinecap .1 W S\n"); //M(-20,0) L(50,0) M(0,-0.2) L(0,30) fprintf(o,"0 0 0 RGB .16 W S\n"); DB x,y; //DO(n,m){x=-X[n]/2.4; y=1000./f[n]; if(n==0) M(x,y) else L(x,y) } DO(n,N){x=(day-n)/10.; y=1000./f[n]; if(n==0) M(x,y) else L(x,y) } fprintf(o,"0 1 0 RGB 1 setlinejoin 1 setlinecap 1 W S\n");
 * 1) define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y);
 * 2) define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y);

M(-12,30) L(50,0) fprintf(o,"0 0 0 RGB .2 W S\n");

fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf dollarplot.eps"); system(   "open dollarplot.pdf"); printf("day of observaiton: %3d\n", day); //     getchar; system("killall Preview");//for mac }

Latex generator of labels
\documentclass[12pt]{article} \usepackage{geometry} \usepackage{graphicx} \usepackage{rotating} \paperwidth 732pt \paperheight 332pt \textwidth 800pt \textheight 400pt \topmargin -92pt \oddsidemargin -84pt \newcommand \sx {\scalebox} \newcommand \rot {\begin{rotate}} \newcommand \ero {\end{rotate}} \begin{document} \begin{picture}(730,306) %\put(10,10){\includegraphics{05}} %\put(10,10){\includegraphics{rusa2014m10m28.pdf}} \put(10,10){\includegraphics{dollarolot.pdf}} \put(-4,308){\sx{1.3}{Ruble}} \put(-4,296){\sx{1.3}{in cents}} \put(-4,282){\sx{1.3}{of USA}} \put(0,210){\sx{2.5}{2}} \put(0,110){\sx{2.5}{1}} \put(0,10){\sx{2.5}{0}} \put(80,-4){\sx{2.5}{$-100$}} \put(214,-4){\sx{2.5}{$0$}} \put(300,-4){\sx{2.5}{$100$}} \put(400,-4){\sx{2.5}{$200$}} \put(500,-4){\sx{2.5}{$300$}} %\put(600,-2){\sx{2.5}{$400$}} \put(640,-2){\sx{2.5}{$t$, days}} \put(86,30){\sx{2.4}{\rot{90}{\bf 2014.05.31}\ero}} \put(130,30){\sx{2.4}{\rot{90}{\bf 2014.07.19}\ero}} \put(230,30){\sx{2.4}{\rot{90}{\bf 2014.10.27}\ero}} \put(330,30){\sx{2.4}{\rot{90}{\bf 2015.02.04}\ero}} \put(430,172){\sx{2.4}{\rot{90}{\bf 2015.05.15}\ero}} \put(530,172){\sx{2.4}{\rot{90}{\bf 2015.08.23}\ero}} \put(630,172){\sx{2.4}{\rot{90}{\bf 2015.12.01}\ero}} \put(730,172){\sx{2.4}{\rot{90}{\bf 2016.03.10}\ero}} \end{picture} \end{document}