FTQuant  0.1
All Classes Files Functions Variables Friends Pages
i_main.cpp
Go to the documentation of this file.
1 #include <gtest/gtest.h>
2 #include <SyntaxParser.hpp>
3 
4 TEST(FTQuant, IntegrationTesting1)
5 {
6  Command C(
7  "BLACK_SCHOLES INTEREST_RATE 0.14 SIGMA 0.8 EXP_T 1. SPOT_PRICE 100.");
8 
9  std::cout << C.to_json() << std::endl;
10 
11  Execution Ex;
12 
13  std::cout << Ex.execute(C) << std::endl;
14 
15  Command B1(
16  "EURO_CALL ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 100 STEPS_NUMBER 100 EXP_T 1. SPOT_PRICE 100.");
17 
18  std::cout << B1.to_json() << std::endl;
19 
20  std::cout << Ex.execute(B1) << std::endl;
21 
22 
23  Command B2(
24  "EURO_CALL ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 1000 STEPS_NUMBER 10 EXP_T 1. SPOT_PRICE 100.");
25 
26  std::cout << B2.to_json() << std::endl;
27 
28  std::cout << Ex.execute(B2) << std::endl;
29 
30 
31  Command B3(
32  "EURO_PUT ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 100 STEPS_NUMBER 100 EXP_T 1. SPOT_PRICE 100.");
33 
34  std::cout << B3.to_json() << std::endl;
35 
36  std::cout << Ex.execute(B3) << std::endl;
37 }
38 
39 TEST(FTQuant, IntegrationTesting2)
40 {
41  Command C(
42  "BLACK_SCHOLES INTEREST_RATE 0.01 SIGMA 0.15 EXP_T 1. SPOT_PRICE 100.");
43 
44  std::cout << C.to_json() << std::endl;
45 
46  Execution Ex;
47 
48  std::cout << Ex.execute(C) << std::endl;
49 
50  Command B1(
51  "EURO_CALL ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 100 STEPS_NUMBER 100 EXP_T 1. SPOT_PRICE 100.");
52 
53  std::cout << B1.to_json() << std::endl;
54 
55  std::cout << Ex.execute(B1) << std::endl;
56 
57 
58  Command B2(
59  "EURO_CALL ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 1000 STEPS_NUMBER 10 EXP_T 1. SPOT_PRICE 100.");
60 
61  std::cout << B2.to_json() << std::endl;
62 
63  std::cout << Ex.execute(B2) << std::endl;
64 
65 
66  Command B3(
67  "EURO_PUT ERROR 0.01 STRIKE_PRICE 100 TRAJECTORIES_NUMBER 100 STEPS_NUMBER 100 EXP_T 1. SPOT_PRICE 100.");
68 
69  std::cout << B3.to_json() << std::endl;
70 
71  std::cout << Ex.execute(B3) << std::endl;
72 }
Container for the commands Class contains the parsed command.
std::string to_json() const
int execute(Command C)
TEST(FTQuant, IntegrationTesting1)
Definition: i_main.cpp:4