-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
28 lines (26 loc) · 1.03 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include "include/EuropeanCallOption.h"
#include "include/Forward.h"
#include "include/Random.h"
using namespace std;
int main()
{
cout << "Hello world!" << endl;
cout << "The following numbers should increase and the one in the middle should be 0" << endl;
cout << Random::MoroInverseCumulativeNormal(0.1) << endl;
cout << Random::MoroInverseCumulativeNormal(0.5) << endl;
cout << Random::MoroInverseCumulativeNormal(0.8) << endl;
cout << "The following numbers should increase" << endl;
cout << Random::CumulativeNormal(0) << endl;
cout << Random::CumulativeNormal(1) << endl;
cout << Random::CumulativeNormal(2) << endl;
cout << Random::CumulativeNormal(3) << endl;
cout << Random::CumulativeNormal(10) << endl;
cout << "Price of a forward" << endl;
Forward f (1.0);
cout << f.GetPrice(2.0,3.0,4.0,5.0,1.0) << endl;
cout << "Price of a european call option" << endl;
EuropeanCallOption c (1.0);
cout << c.GetPrice(2.0,3.0,4.0,5.0,1.0) << endl;
return 0;
}