Skip to content

Commit cbe1baa

Browse files
committed
Use inlined code for example and add output
1 parent 19b0d16 commit cbe1baa

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

doc/modules/ROOT/pages/financial_examples.adoc

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ https://www.boost.org/LICENSE_1_0.txt
1717
include::example$numerical_parsing.cpp[]
1818
----
1919
20-
.Expected Outcome
20+
.Expected Output
2121
....
2222
Number of data points: 252
2323
Sum from MS Excel: 52151.99
@@ -27,10 +27,19 @@ Sum using decimal32_t: 52151.99
2727
====
2828

2929
[#examples_boost_math]
30-
== Boost.Math Integration
31-
32-
=== Bollinger Bands
30+
== Boost.Math to Calculate Bollinger Bands
31+
====
32+
[source, c++]
33+
----
34+
include::example$statistics.cpp[]
35+
----
3336
34-
In the examples folder there is a file named `statistics.cpp`.
35-
This example demonstrates how to parse a file, and then leverage Boost.Math to compute statistics of that data set culminating with the values of the Bollinger Bands.
36-
This example could be extended with the simple moving average to create full bands based on the period of the moving average you would like.
37+
.Expected Output
38+
....
39+
Mean Closing Price: $207.20
40+
Median Closing Price: $214.26
41+
Standard Deviation: $25.45
42+
Upper Bollinger Band: $258.11
43+
Lower Bollinger Band: $156.30
44+
....
45+
====

0 commit comments

Comments
 (0)