Skip to content

Commit 1baa1d8

Browse files
committed
Merge branch 'qpr12883' into 'master'
QPR-12883 -- Add SIMM calibration files to open source and fix OREApp so that... See merge request qs/ore-github!61
2 parents a3301a8 + f10b396 commit 1baa1d8

10 files changed

Lines changed: 9106 additions & 5 deletions

Configurations/SIMM/simmcalibration_2.2.xml

Lines changed: 1284 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.3.8.xml

Lines changed: 1293 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.3.xml

Lines changed: 1282 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.5.xml

Lines changed: 1291 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.5A.xml

Lines changed: 1291 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.6.5.xml

Lines changed: 1291 additions & 0 deletions
Large diffs are not rendered by default.

Configurations/SIMM/simmcalibration_2.6.xml

Lines changed: 1291 additions & 0 deletions
Large diffs are not rendered by default.

Docs/UserGuide/simmcalibration.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ \subsection{SIMM Calibration: {\tt simmcalibration.xml}}\label{sec:simmcalibrati
44

55
The SIMM Calibration can be used to add or override SIMM versions by specifying the risk weights, correlations,
66
concentration thresholds along with associated buckets/labels and currency groups (for risk class FX and IR).
7+
78
See Example\_44 for a full SIMM calibration file for SIMM 2.5A \cite{SIMM2.5A}.
9+
The official configuration files for each version (SIMM 2.2 and greater) can be found in folder {\tt Configurations/SIMM/}
810

911
The file consists of a {\tt <SIMMCalibrationData>} node, with {\tt <SIMMCalibration>} subnodes that each define a given
1012
SIMM version, as in Listing \ref{lst:simmcalibration_data} below.

OREAnalytics/orea/app/oreapp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,17 +1285,17 @@ void OREAppInputParameters::loadParameters() {
12851285
if (tmp != "")
12861286
setMporDays(static_cast<Size>(parseInteger(tmp)));
12871287

1288-
tmp = params_->get("simm", "crif", false);
1288+
tmp = params_->get("simm", "simmCalibration", false);
12891289
if (tmp != "") {
12901290
string file = (inputPath / tmp).generic_string();
1291-
setCrifFromFile(file, csvEolChar(), csvSeparator(), '\"', csvEscapeChar());
1291+
if (boost::filesystem::exists(file))
1292+
setSimmCalibrationDataFromFile(file);
12921293
}
12931294

1294-
tmp = params_->get("simm", "simmCalibration", false);
1295+
tmp = params_->get("simm", "crif", false);
12951296
if (tmp != "") {
12961297
string file = (inputPath / tmp).generic_string();
1297-
if (boost::filesystem::exists(file))
1298-
setSimmCalibrationDataFromFile(file);
1298+
setCrifFromFile(file, csvEolChar(), csvSeparator(), '\"', csvEscapeChar());
12991299
}
13001300

13011301
tmp = params_->get("simm", "calculationCurrency", false);

tutorials/tutorials.030.docker.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
# Running ORE Under Docker
3+
4+
The ORE project includes support for Docker. You can build a docker container
5+
including ORE binaries and tests.
6+
7+
## Docker scripts
8+
9+
Below are the scripts which the ORE project includes in support of Docker:
10+
11+
```
12+
├───Docker/.env set environment variables
13+
14+
└───Docker/DockerfileRunORE.sh build all docker containers
15+
16+
├───Docker/docker-compose-ore.yml compose file for container env_ore
17+
│ │
18+
│ └────Docker/Dockerfile-ORE docker file for container env_ore
19+
20+
├───Docker/docker-compose-test.yml compose file for container env_ore_test
21+
│ │
22+
│ └───Docker/Dockerfile-Test docker file for container env_ore_test
23+
24+
└───Docker/docker-compose-ore-app.yml compose file for container ore_app
25+
26+
└───Docker/Dockerfile-ORE-App docker file for container ore_app
27+
```
28+
`env_ore` is a preliminary container for the build environment. `env_ore_test`
29+
is a preliminary container for the testing tools. The minimum essentials from
30+
these two containers are extracted into container `ore_app`, which is the final
31+
product supporting a working ORE environment.
32+
33+
## Building the Docker Container
34+
35+
If you are on a POSIX system (e.g. linux or MacOS), you can run:
36+
37+
Docker/DockerfileRunORE.sh
38+
39+
On Windows, you can replicate the behavior of the above script by running the
40+
following commands at a DOS prompt:
41+
42+
SET COMPOSE_DOCKER_CLI_BUILD=1
43+
SET DOCKER_BUILDKIT=1
44+
docker-compose --env-file Docker/.env -f Docker/docker-compose-ore.yml build
45+
docker-compose --env-file Docker/.env -f Docker/docker-compose-test.yml build
46+
docker-compose --env-file Docker/.env -f Docker/docker-compose-ore-app.yml build
47+
48+
This creates the docker images:
49+
50+
$ docker images
51+
REPOSITORY TAG IMAGE ID CREATED SIZE
52+
ore_app latest 1861c2dba528 7 seconds ago 2.02GB
53+
env_ore latest 9e016430d0dd 15 minutes ago 3.42GB
54+
env_ore_test latest 55b8da9c2c8a 2 months ago 1.15GB
55+
56+
## Run the Docker Container Interactively
57+
58+
Invoke the command below to run the docker container interactively:
59+
60+
docker run -it ore_app bash
61+
62+
Here are the commands to run the examples:
63+
64+
cd /ore/Examples
65+
python3 run_examples_testsuite.py --with-xunitmp --xunitmp-file=examples.xml --processes=8 --process-timeout=3600
66+
67+
Here are the commands to run all of the unit tests in parallel:
68+
69+
cd /ore
70+
PARAMS="--log_format=XML --log_level=test_suite --report_level=no --result_code=no"
71+
/ore/App/quantlib-test-suite --nProc=4 $PARAMS --log_sink=xunit_ql.xml &
72+
/ore/App/quantext-test-suite --nProc=6 $PARAMS --log_sink=xunit_qle.xml &
73+
/ore/App/ored-test-suite $PARAMS --log_sink=xunit_ored.xml -- --base_data_path=/ore/OREData/test &
74+
/ore/App/orea-test-suite --nProc=4 $PARAMS --log_sink=xunit_orea.xml -- --base_data_path=/ore/OREAnalytics/test &
75+
wait
76+

0 commit comments

Comments
 (0)