Main examples can be found in C++ and Python
Atlas aims to become a real alternative to existing financial tools on the market, offering greater performance, simplicity and scope.
-
Performance: In terms of performance, to date, the only usable alternative in productive systems is QuantLib, which has a myriad of tools for valuing various instruments. However, it is important to mention that QuantLib is not intended to be fast (it does not have multithreading by default, for example), but focuses on flexibility. We believe there is a space in the market where Atlas can differentiate itself by narrowing the scope of available tools and focusing on speed, building from the ground up with that goal in mind.
-
Simplicity: Simplicity is another key aspect of Atlas. The aim is to have a simple but practical tool, so that users can learn to use it easily, and flexible enough to implement the most advanced financial instruments in the market.
Some of the technical features to be incorporated in Atlas are:
-
Multithreading: having a structure that allows the library to be used in a thread-safe way is crucial in order to get the most out of it.
-
Automatic differentiation: AAD has become a standard for the calculation of sensitivities in the financial world, enabling the possibility of automatically calculating risks without having to recalculate all our instruments. This functionality is crucial if, for example, you are looking to calculate XVAs or other metrics.
You can find the documentation available until today at https://jmelo11.github.io/atlasdocs/.
- Basic class structure (under development)
- Automatic differentiation
- CPU Parallelisation
- Port to Python
- Portfolio compression
- Transformation to local currency
- Currency precision
- GPU Parallelisation (depends on feasibility)
- Instrument customisation (incorporate QL parameters)
- NPV
- Sensitivities (e.g. Duration)
- Par Rates
- ZSpread
-
Linear Products
- Loans
- Fixed rate loans (bullet)
- Fixed rate loans (equal instalments)
- Fixed Rate Loans (custom payment profile)
- Floating rate loans (bullet)
- Loans floating rate (custom payment profile)
- Mixed rate loans
- Derivatives
- Forwards
- Vanilla swaps
- Xccy
- OIS
- Fixed Income
- Instruments with market conventions
- Loans
-
Non-linear products
- Interpolation with AD support
- Curves with AD support
- Bootstrap with AD support
- Generation of rates based on static curves
- LGM for generation of market trajectories
Before compiling the project, you need to install the following libraries:
- Boost: https://www.boost.org/
- QuantLib: https://github.com/lballabio/quantlib
The future goal is to replace these dependencies with internal versions of the project.
To facilitate the compilation process, it is suggested to organise the directories as follows:
- builds
- release
- debug
- libs
- QuantLib
- boost
- Inside the libs/QuantLib directory, create a folder called build.
- Open a terminal and navigate to the newly created build folder.
- Run the following commands, replacing <path/to/installed/libs> and <your/boost/path> with the appropriate paths:
cmake -S . -B . -DCMAKE_CXX_STANDARD=20 -DCMAKE_PREFIX_PATH='<path/to/installed/libs>' -DBoost_INCLUDE_DIR='<your/boost/path>' -DQL_BUILD_BENCHMARK=OFF - DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DCMAKE_CXX_FLAGS="/MDdd /EHsc /MP" -DQL_TAGGED_LAYOUT=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDebugDLL" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDebugDLL" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDebugDLL"
cmake --build . --target INSTALL --config <config>
cmake -S . -B . -DCMAKE_CXX_STANDARD=20 -DCMAKE_PREFIX_PATH='<path/to/installed/libs>' -DBoost_INCLUDE_DIR='<your/boost/path>' -DQL_BUILD_BENCHMARK=OFF -DQL_BUILD_BENCHMARK=OFF -DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DQL_BUILD_EXAMPLES=OFF DQL_BUILD_EXAMPLES=OFF -DQL_BUILD_TEST_SUITE=OFF -DCMAKE_CXX_FLAGS="/MD /EHsc /MP" -DQL_TAGGED_LAYOUT=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL" -DQL_TAGGED_LAYOUT=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreadedDLL"
cmake --build . --target INSTALL --config <config>
Where config can be Debug or Release, depending on the configuration you want to compile.
Boost includes an installer. Follow the instructions at https://www.boost.org/doc/libs/1_82_0/more/getting_started/windows.html to install it on your system.
- Inside the Atlas project directory, create a folder named build.
- Open a terminal and navigate to the newly created build folder.
- Run the following commands, replacing
path/to/installed/libds
andyour/boost/path
with the appropriate paths:
cmake -S . -B . -DCMAKE_CXX_STANDARD=20 -DCMAKE_PREFIX_PATH='<path/to/installed/libs>' -DBoost_INCLUDE_DIR='<your/boost/path>'
cmake --build . --target install --config <config>
cmake -S . -B . -DCMAKE_CXX_STANDARD=20 -DCMAKE_PREFIX_PATH='<path/to/installed/libs>' -DBoost_INCLUDE_DIR='<your/boost/path>'
In case you want to install the package from this repository, you need to configure the setup.py
file. In this case, it will also be necessary to have pybind11 installed. For consistency it is recommended to use CMAKE for this, as this way the find_package`` command will work. Once installed and the ````BUID_PYTHON=ON
option is selected when configuring Atlas, you just need to:
- Go with the terminal to the
python
folder. - Execute the command
pip install .
.
It is also possible to install the standard package via PYPI:
pip install atlas-finance
or pip install atlas-finance-noad
.