Skip to content

Commit fe3c5f7

Browse files
v1.2 (#125)
* Fully Flexible Resampling intermediate commit * Fully Flexible Resampling intermediate commit 2 * Several docs updates * Final Fully Flexible resampling commit * Initial Fully Flexible Resampling test commit * Full coverage for FullyFlexibleResampling class * README and docs updates * Minor docstrings updates * Docstrings and type hints updates * Docs and README update --------- Co-authored-by: Anton Vorobets <admin@fortitudo.tech>
1 parent 063595a commit fe3c5f7

33 files changed

Lines changed: 420 additions & 162 deletions

README.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Fortitudo Technologies Open Source
1313
==================================
1414

1515
This package allows you to explore open-source implementations of some of our
16-
fundamental methods, e.g., Entropy Pooling and CVaR optimization in Python.
16+
fundamental methods, for example, Sequential Entropy Pooling (SeqEP), CVaR optimization,
17+
and Fully Flexible Resampling (FFR) in Python.
1718

1819
You can watch this `YouTube playlist <https://www.youtube.com/playlist?list=PLfI2BKNVj_b2rurUsCtc2F8lqtPWqcs2K>`_
1920
for a walkthrough of the package's functionality and examples.
@@ -35,13 +36,6 @@ portfolio constraints and Entropy Pooling views using matrices and vectors.
3536
This gives full flexibility in relation to working with these technologies.
3637
Hence, input checking is intentionally kept to a minimum.
3738

38-
Company
39-
-------
40-
41-
Fortitudo Technologies offers novel investment software as well as quantitative
42-
and digitalization consultancy to the investment management industry. For more
43-
information, please visit our `website <https://fortitudo.tech>`_.
44-
4539
Installation Instructions
4640
-------------------------
4741

@@ -59,7 +53,7 @@ package using pip. You can do this by following these steps::
5953
pip install fortitudo.tech
6054

6155
The examples might require you to install additional packages, e.g., seaborn and
62-
ipykernel / notebook / jupyterlab if you want to run the notebooks. Using pip to
56+
ipykernel/notebook/jupyterlab if you want to run the notebooks. Using pip to
6357
install these packages should not cause any dependency issues.
6458

6559
You can also explore the examples in the cloud without any local installations using
@@ -69,14 +63,21 @@ some of the optimized routines this package uses. If you want access to a stable
6963
and optimized environment with persistent storage, please subscribe to our Data
7064
Science Server.
7165

66+
Company
67+
-------
68+
69+
Fortitudo Technologies offers novel investment software as well as quantitative
70+
and digitalization consultancy to the investment management industry. For more
71+
information, please visit our `website <https://fortitudo.tech>`_.
72+
7273
Disclaimer
7374
----------
7475

7576
This package is completely separate from our proprietary solutions and therefore
7677
not representative of the quality and functionality offered by the Investment Simulation
7778
and Investment Analysis modules.
7879

79-
For a short comparison of which CVaR problems the Investment Analysis module can solve
80+
For a short presentation of which CVaR problems the Investment Analysis module can solve
8081
and at what speed, see the
8182
`cvar-optimization-benchmarks repository <https://github.com/fortitudo-tech/cvar-optimization-benchmarks>`_.
8283

21.7 KB
Binary file not shown.
2.38 KB
Binary file not shown.
533 Bytes
Binary file not shown.

docs/build/doctrees/index.doctree

722 Bytes
Binary file not shown.
-8 Bytes
Binary file not shown.

docs/build/html/_sources/documentation.rst.txt

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ given by `the Danish common return expectations for the 2nd half of 2021
1212

1313
The parameters and P&L simulation are used in the examples and allow you to
1414
immediately start exploring the functionality of this package. You can also
15-
use it to test your understanding of the theory by replicating results, e.g.,
16-
the sequential Entropy Pooling results from :cite:t:`Vorobets2021`.
15+
use it to test your understanding of the theory by replicating results, for
16+
example, the sequential Entropy Pooling results from :cite:t:`Vorobets2021`.
1717

1818
In addition to the above, simulated time series of an equity index, an
1919
associated implied volatility surface, a risk-free zero-coupon curve, and
2020
a credit spread curve is included. You can use this time series data to,
21-
e.g., validate your risk modeling approach. See `this introduction example
21+
for example, validate your risk modeling approach. See `this introduction example
2222
<https://github.com/fortitudo-tech/fortitudo.tech/blob/main/examples/4_TimeSeries
2323
.ipynb>`_ and `this modeling example <https://github.com/fortitudo-tech/
2424
fortitudo.tech/blob/main/examples/7_RiskFactorViews.ipynb>`_ for an example
@@ -28,6 +28,26 @@ views on risk factors.
2828
.. automodule:: fortitudo.tech.data
2929
:members:
3030

31+
Simulation
32+
----------
33+
34+
This package includes a Fully Flexible Resampling (FFR) method as well as a
35+
very simple exponential decay simulation model. The FFR functionality, originally
36+
introduced in the `Portfolio Construction and Risk Management book
37+
<https://antonvorobets.substack.com/p/pcrm-book>`_, is only implemented with
38+
one continous state variable.
39+
40+
For detailed proofs of all the nice properties of the Fully Flexible Resampling
41+
method, see :cite:t:`KristensenVorobets2025`.
42+
43+
The exponentially decaying probabilities can be used directly with historical
44+
scenarios, for example, as a prior probability for Sequential Entropy Pooling (SeqEP)
45+
views/stress tests, the FFR method, or for a normal distribution calibration
46+
which new samples can be generated from.
47+
48+
.. automodule:: fortitudo.tech.simulation
49+
:members:
50+
3151
Entropy Pooling
3252
---------------
3353

@@ -42,15 +62,15 @@ subject to the constraints
4262
The approach was first introduced by :cite:t:`EntropyPooling`, while the
4363
code is implemented using notation from :cite:t:`Vorobets2021`. For an
4464
introduction to Entropy Pooling, see `this video <https://youtu.be/qk_5l4ICXfY>`_
45-
or `this Substack post <https://open.substack.com/pub/antonvorobets/p/entropy-pooling-vs-black-litterman-abb608b810cd>`_.
65+
or `this Substack post <https://antonvorobets.substack.com/p/entropy-pooling-collection>`_.
4666

4767
.. automodule:: fortitudo.tech.entropy_pooling
4868
:members:
4969

5070
Functions
5171
---------
5272

53-
The functions below are useful when working with Entropy Pooling, e.g.,
73+
The functions below are useful when working with Entropy Pooling, for example,
5474
they can be used to calculate posterior moments and correlation matrix
5575
to verify that views have been implemented correctly. The covariance
5676
matrix function is useful for mean-variance optimization with Entropy
@@ -138,18 +158,3 @@ or :const:`'abstol'` conditions are satisfied. The parameters have been tested
138158
with "percentage return" P&L and work well. In most cases, the algorithm stops
139159
due to relative convergence in less than 100 iterations. If you use P&L
140160
simulations that are scaled differently, you might need to adjust them.
141-
142-
Simulation
143-
----------
144-
145-
This package includes a very simple exponential decay simulation model. The
146-
exponentially decaying probabilities can be used directly with historical
147-
scenarios, e.g., as a prior probability for Entropy Pooling views / stress-tests,
148-
or for a normal distribution calibration which new samples can be generated from.
149-
150-
You can see how to use this functionality in `the exponential decay modeling
151-
example <https://github.com/fortitudo-tech/fortitudo.tech/blob/main/examples/
152-
6_SimulationExpDecay.ipynb>`_.
153-
154-
.. automodule:: fortitudo.tech.simulation
155-
:members:

docs/build/html/_sources/examples.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ The repository contains the following examples:
3535
12) The accompanied code for :cite:t:`Vorobets2025` that performs tests
3636
for normality of US equity index returns and rejects the Aggregational
3737
Gaussianity hypothesis
38+
13) High-dimensional CVaR portfolio optimization code, where a portfolio of
39+
2000 stocks is optimized over 10000 joint scenarios.
3840

3941
Watch this `YouTube playlist <https://www.youtube.com/playlist?list=PLfI2BKNVj_b2rurUsCtc2F8lqtPWqcs2K>`_
4042
for a walkthrough of the package's functionality and examples. The examples are

docs/build/html/_sources/index.rst.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Fortitudo Technologies Open Source
22
==================================
33

44
This package allows you to explore open-source implementations of some of our
5-
fundamental methods, e.g., Entropy Pooling and CVaR optimization in Python.
5+
fundamental methods, for example, Sequential Entropy Pooling (SeqEP), CVaR optimization,
6+
and Fully Flexible Resampling (FFR) in Python.
67

78
You can watch this `YouTube playlist <https://www.youtube.com/playlist?list=PLfI2BKNVj_b2rurUsCtc2F8lqtPWqcs2K>`_
89
for a walkthrough of the package's functionality and examples.
@@ -35,10 +36,10 @@ Disclaimer
3536
----------
3637

3738
This package is completely separate from our proprietary solutions and therefore
38-
not representative of the quality and functionality offered by the Investment Simulation
39-
and Investment Analysis modules.
39+
not representative of the quality and functionality offered by the `Investment Simulation
40+
and Investment Analysis modules <https://fortitudo.tech/solutions>`_.
4041

41-
For a short comparison of which CVaR problems the Investment Analysis module can solve
42+
For a short presentation of which CVaR problems the Investment Analysis module can solve
4243
and at what speed, see the
4344
`cvar-optimization-benchmarks repository <https://github.com/fortitudo-tech/cvar-optimization-benchmarks>`_.
4445

docs/build/html/_sources/installation.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ package using pip. You can do this by following these steps::
1515
pip install fortitudo.tech
1616

1717
The examples might require you to install additional packages, e.g., seaborn and
18-
ipykernel / notebook / jupyterlab if you want to run the notebooks. Using pip to
18+
ipykernel/notebook/jupyterlab if you want to run the notebooks. Using pip to
1919
install these packages should not cause any dependency issues.
2020

2121
You can also explore the examples in the cloud without any local installations using

0 commit comments

Comments
 (0)