Using Rapp.zip with Rapp free actuarial program and examples
-- November 2017, Stig Rosenlund
Windows XP or later is required. Start by downloading and installing MiKTeX from internet if you don't
already have it. Just google miktex. The Basic Installer is sufficient. At present you can use
Choose 64-bit for a 64-bit computer. Rapp produces text files with PostScript code which are made to
Pdf with the MiKTeX ps2pdf command. Alternatively you can use Adobe Acrobat Distiller as stated in the
manual with the help of Pgm\Ps2pdfAD.Bat. MiKTeX is free, while Acrobat Distiller costs money.
Unzip the folders of Rapp.zip to suitable locations.
They need not all be under the same folder. But assume
that Pgm was placed as C:\Rapp\Pgm and the other
folders also were put under the folder Rapp. Then run
C:\Rapp\Pgm\Adapt.Exe. It can be run also at other locations.
If Assoc.Bat was created in the working directory, run it for info. At answer N nothing happens. To
make a partial installation with file type associations etc, run again as administrator, answering Y.
At a workplace this must probably involve an IT-person. You can edit Assoc.Bat as instructed in its
code. Assoc.Bat is not essential. But if you move Rapp.Exe after
associating it as open program for files .Rpp, then you might have difficulties
associating it again. Assoc.Bat fixes that.
C:\Rapp\Pgm\Rapp.Exe is for a 64-bit computer. For 32-bit, replace C:\Rapp\Pgm\Rapp.Exe with
C:\Rapp\Pgm\Rapp32Vc2017.Exe. For more info on the Rapp exes, see
http://www.stigrosenlund.se/rapp.htm and subpages.
See C:\Rapp\Dok\Rapp-run-and-edit.doc for info on running and editing Rapp programs. Below a summary.
In the Explorer you run Rapp as usual by double-click or right-click and Open with.
To run Rapp from the Command Prompt, make this batch file in the directory you come to by writing the
command Notepad Br.Bat.
echo You run exe-files primarily from C:\Rapp\Pgm.
After having made Br.Bat you enter an environment for running Rapp by the command Br. There you run
Rapp from the Command Prompt in C:\Rapp\Rpp. Eg:
Rapp "Mangle1", or Rapp "Mangle1.Rpp".
More arguments can be passed on the command line, but you will not often need these. Quotation marks
are needed for names with embedded blanks. Many Rapp users name their programs with extent .sas in
order to use the SAS editor for developing Rapp programs. Then the extent must be present in the
Now you can start to run Rapp programs in C:\Rapp\Rpp. They can all be run directly, using fictitious
data, provided you first run Mangle1.Rpp and Mangle2.Rpp to create data
for reserves, maps and tariff analysis, respectively. And you can use the menus of the Visual Basic
You might have to delete C:\Users\Youruser\AppData\Local\Rappmenus and
C:\Users\Youruser\AppData\Roaming\Microsoft\Windows\Recent\Rappmenus.lnk, if they exist, before downloading a
new version of Rappmenus.Exe.
The menu has numerous right-click information windows.
Dynamically generated Rapp programs in Rappmenus can be edited and run outside the menu. The example
programs can be edited to change names of in- and out-files. You can do it with a Rapp program:
Proc Chaall root(F:\Dept01\Rapp\Rpp) files(*.*) cha("C:\Rapp" "F:\Dept01\Rapp") Ci Endproc
Initial steps in directory C:\Rapp\Rpp after MiKTeX download and Br
Check the Pdf file. If the text is too high up, so that the page numbers are not visible, or too low,
then adjust pdfoffset() in Init.Rpp. If too high decrease the value from pdfoffset(14) to pdfoffset(0)
or some other suitable value. Negative values are allowed. If too low increase the value. You will
have to experiment.
Initial steps for C:\Rapp\Pgm\Rappmenus.Exe
Place a shortcut to it on the desktop or Start menu.
Start the program and write the full path C:\Rapp\Pgm\Rapp.Exe in the text box.
Enter the menus and open some parmfile in each. See the table at the bottom for parmfile directories.
In the menus Bich and Reserves of Rappmenus.Exe you open parmfiles. (They could be called projects.)
Look in C:\Rapp\BRparm. The manual is Dok\Resvmane.doc. DemoRDC2.Txt has parameters for performing the
GLM RDC/RBNS analysis. There is also a simpler menu "Triangle based simple reserves". Look in C:\Rapp\Sparm. (S for Simple.)
You create C:\Rapp\Data\ResI-2.Txt and C:\Rapp\Data\ResP-2.Txt with Mangle1.Rpp. It will take between
3 and 10 seconds with a modern computer. They have arguments 2, 3, 4 appended to argument 1
underscore-separated. This facilitates GLM analysis of RDC/RBNS reserves.
Two lines from ResP-2.Txt
00000000000000001 07_07_HC_130 07 HC 130 0 20110501 20110501 20110501 20110901 695
00000000000000002 38_07_HC_010 07 HC 010 1 20110101 20110101 20110101 20110901 1339
These files are input in parmfile C:\Rapp\BRparm\DemoRDC2.Txt.
There is a large file C:\Rapp\Data\Fors0.Txt with insurances and a smaller file C:\Rapp\Data\Skad1.Txt
with claims. To use tariff analysis programs C:\Rapp\Rpp\Taran.Rpp and the other ones beginning with
Taran, you first run C:\Rapp\Rpp\Mangle2.Rpp. This matches info from C:\Rapp\Data\Breeds.Txt and
produces a new file C:\Rapp\Data\Fors1.Txt with exposures computed. Takes between 20 and 60 seconds.
Then Fors1.Txt and Skad1.Txt are input to the tariff analysis programs.
For the menu Tariff analysis you open parmfiles, as for Reserves. Look in C:\Rapp\Tparm.
Data mangling in menu
Some of the Rapp data mangling facilities are available in the menu Data mangling of Rappmenus.Exe.
Namely elimination of overlapping insurance periods and temporal overmatching of insurance info to
claims. These draw on my long experience of constructing actuarial data warehouses at Länsförsäkringar
Alliance and WASA Insurance. Look for parmfiles in C:\Rapp\Dparm.
In 2015 and 2016 I have added a mathematical language, which I call Mbasic, within the language Rapp.
The M in Mbasic stands for Multiple precison, ie you choose the number of correct decimal digits up to
306 with Rapp.Exe for a floating data type called mouble. Variants of Rapp.Exe can handle up to 9000
digits, although for some complicated functions the results will have a maximum of 306 correct digits.
The common double data type with an 8-byte storage is also available. Also M stands for Matrix Basic.
Mbasic has all elementary and inverse circular functions and also matrix calculus. The normal
probability distribution function, its inverse and related functions. The Gamma and Psi functions. The
incomplete Gamma function, ie the Gamma distribution function. Bessel functions of the first and
second kind. In 2017 I have added complex calculus. All elementary operations, some functions and
matrix calculus are implemented.
There is no graphical shell for Mbasic - you use a text editor you are accustomed to to write Mbasic
programs within a Rapp proc called Proc Mbasic.
Overview of folders for programs, data and documentation
|BRparm ||Parmfiles for Bich stochastic reserving and Reserves.
Any parmfile will work for both applications.|
|Data ||Input files to Rapp. Kpi.Txt and Kpim.Txt contain the Swedish CPI.
Download new data from http://www.scb.se.|
|Dok ||Manuals Rappmane.doc and Resvmane.doc.|
|Dparm ||Parmfiles for Data mangling.|
|Jt ||Info on available RAM, created new each month, and temporary files. You can visit the folder
sometimes to delete files left after crashes. If you prematurely close a window where Rapp executes,
there will most often be temporary files left. If you do not delete files, they will be deleted
automatically once a month.
|Mapdata||Coordinate files and other input files to Proc Map. Mangle2.Rpp transforms Europe01.svg.|
|Mbparm ||Parmfiles for the edit menu for Mbasic and Rapp in general.|
|Mparm ||Parmfiles for Maps. Contains three templates that can be run with available files in Mapdata after Mangle2.Rpp and one template for submenu Svg2co.|
|Pgm ||AllInOne.htm, Adapt.Exe, Ps2pdfAD.Bat, Rapp.Exe, Rapp32Vc2017.Exe, Rappmenus.Exe and Rapp icon.|
|Rpp ||Rapp programs and a few small data text files.|
|Sparm ||Parmfiles for "Triangle based simple reserves".|
|Tparm ||Parmfiles for Tariff analysis.|
|Pdf ||Output Pdf files. They are accessible for browse in Rappmenus.|
|Txt ||Output text files. You will normally not need to edit these.
They are intermediary to Pdf and Xml files.|
|Xml ||Output Excel files. Accessible for edit in Rappmenus.
Four files are already there for the Xlmerg.Rpp example program.|
Send questions & bug reports to email@example.com !