Python components for QA: Design your contract with qalgebra. Monitor and price it with qapi
Project description
QA
Design, monitor and price your own financial contracts.
๐บ Project Status
โญ Star the project on GitHub helps it to progress.
๐ฐ Latest news
- 2024-01-07
- ๐(Release) qa-v0.2.0 is out ๐
๐ท Current work
- 2024-01-07
- ๐(Long Term Project) Handling early exercise feature.
- ๐(Short Term Project) Working on a C++ API library.
- ๐(Misc) Making a contract feature(s) solver.
- ๐(Issue) Checking why remote database connection takes so long
๐ Achievements
- 2024-01-07
- ๐(Long Term Project) Implemented orthogonal polynomials framework together with quadratures techniques.
- ๐(Short Term Project) Implemented PDE pricer framework, Romberg-Richardson extrapolation and theta schemes.
- ๐(Misc) Implemented intraday fixings, payments and exercises.
- ๐(Issue) Identified stack overflow issue for deep conditionnal contracts (ex: 10y daily convertible bond)
๐ Table of Contents
- ๐ฅ Introduction
- โก๏ธ Quick Start
- ๐ด Features
- ๐ List of features
- ๐ค Missing a specific feature ?
- ๐ Found a bug ?
- ๐ How can I contribute ?
- ๐ป Insights
- ๐ฏ Developement
- ๐ Build
- ๐ Tests
- ๐ Continuous Integration
- ๐ Continuous Delivery
- ๐ Licence
๐ฅIntroduction
QA-Quantitative Analytics
is an ecosystem of components that helps you with designing, monitoring and pricing your own financial derivatives.
-
qacore (private) -- The core library of the project that is the agregation of embedded libraries in charge of implementing contract, data, modeling and pricing engine.
-
qapp (public) -- The GUI desktop application through which the user can interact with
qacore
and send all kind of request such as pricing a contract, feed a database, see model calibration results, inspect the contract lifetime events and much more. -
qalgebra (private) --
qacore
uses the power of algebraic contract description andqalgebra
is the library that implements it: A customized language easily understandable by human and machine to design your contract with a self-explanatory script. Thanks to qalgebra, the user can write down a contract using this simple language and send it toqa
to run any generic actions such as pricing, monitoring and much more. The wholeqa
ecosystem is built arroundqalgebra
device. -
qafactory (public) -- For the users to benefit their own
qalgebra
experience and price their own contracts, our developpers created qa-factory, a friendly repository where all programmer enthusiasts can use and contribute its favorite payoff functions and contracts to eventually use it fromqapp
. This game room is yours, feel free to populate and use it at your convenience.
โก๏ธ Quick Start
To download the latest version of our application, go to Releases and download the asset that corresponds to your operating system. After extracting all the files into a nice location of your machine, you are falling onto a folder that contains qa
directory. Open the qapp
executable located at qa/bin and you arrive to the main page.
On the left hand side of the screen is located a logger that displays the messages that qacore
returns after each actions.
Each action triggers by qapp
- typically pressing a button - throws information, warnings, errors and/or exceptions.
- If an exception is thrown, it means something went wrong dev side. In that case please report your issue by dropping your
mockup
file together with your contract and data json files if any (see How can I report my issue). - If an error is thrown, it means that something went wrong user side and
qacore
did not manage to perform your request. In that case you need to check the log and correct your request accordingly. - If a warning is thrown, it means that something went wrong user side but
qacore
managed to perform the request. At inception, an action always thrown an information message to the user such as "Pricing contract...", the goal is to inform what actionqapp
is performing. When the action is over, a success is thrown if an only if no error or exception occured during the action lifetime.
๐ด Features
๐ List of features
- ๐บ How can I report my issue ?
- ๐บ How can I build my contract ?
- ๐บ How can I load my contract ?
- ๐บ How can I move my contract ?
- ๐บ How can I edit my fixings ?
- ๐บ How can I manage my data sources ?
- ๐บ How can I feed my data sources ?
- ๐บ How can I display my observable ?
- ๐บ How can I price my contract with Monte Carlo ?
- ๐บ How can I inspect my Monte Carlo ?
๐ค Missing a specific feature ?
The project is very far from being complete (and will probably never be ...) and a loads of features are still missing. This is why our developpers are working continuously to enrich the list of available functionalities. Feel free to share your ideas! We are happy to discuss with you about your personnal needs and the feasibility of your project.
[!NOTE] If your idea is considered as doable by our team, be sure that your request will be added to our stack. But please kindly understand that we cannot give any ETA since our developers are working for
qa
as volunteers aside their job and our backlog is already populated by a thousand of new fields to explore.
๐ Found a bug ?
Feel free to report your issue (see How can I report my issue ?) with a respective title and an understandable description. For any questions, you can always reach out to us directly via our twitter or post your question on QuantStackExchange with the official qa
tag.
[!IMPORTANT]
qa
embbeds a mecanism to save and open your currentmockup
for further usage. If possible please attach yourmockup
file together with the relevant data json files and contract cpp/json files in your issue, it helps our developpers to reproduce the bug and increase the chances for us to be sort it quickly. See How can I report my issue ? for further details on how to proceed.
๐ How can I contribute ?
qa-factory
is a repository where you can:
- Contribute your payoff functions (src/ and include/) and your contracts (tests/).
- Fork the repo.
- Clone your fork.
# clone qa-factory repository.
git clone https://github.com/matt-charr/qa-factory.git
- Make your masterpeace.
- Submit your pull request.
- Use additionnal features (functions) provided by other users to ease your contract design.
In order to do this, you just need to clone it inside your factory directory.
# go to factory.
cd factory &&
# clone qa-factory repository.
git clone https://github.com/matt-charr/qa-factory.git
๐ป Insights
๐ฏ Developement
Once a bug or a new feature is submitted, an issue is created with the corresponding flag (bug, feature, project, creation). Once picked from the stack, a dev branch is created, comes down locally to the developper machine and this is where the fun begins ๐
๐ Build
qa
uses CMake as a build system and has its main code base located on a private repository which access is restricted to our developers only. Besides, it relies on a bunch of repository dependencies that are required at qa
developpement/build time.
It is to the following projects that we owe our heartfelt thanks for their generous Open Source contribution.
To load the below dependencies, qa
uses the power of superbuild feature from CMake. For that purpose, an embedded CMake project is in charge of cloning, building and installing all the dependencies that qa
requires into a specific folder. That's pretty cool, isn't it ? ๐
๐ Tests
At the end of each dev session, a new unit test is required to be submitted to the test suite together with a contract json file that replicates the expected behavior of the code change. To ensure that the code change effect is not broken by any subsequent modifications, we use the service of GTest as a testing framework.
๐ Continuous Integration
qa
embbeds a custom GitHub action that runs at each pull requests. Once a pull request is submitted, build and tests are triggered on our Windows and Linux self-hosted runners in Debug/Release mode with the below configurations. A dev branch is merged if and only if all builds and tests passed on all configurations.
Name | OS | CMake | Generator | Architecture | Build Type | Compiler | Status |
---|---|---|---|---|---|---|---|
Windows-Release | windows-latest | CMake-3.27.2 | MinGW Makefiles | x64 | Release | GCC-13.2.0 | โ |
Windows-Debug | windows-latest | CMake-3.27.2 | Visual Studio 17 2022 | x64 | Debug | MSVC-19.30.30709.0 | โ |
Linux-Release | ubuntu-latest | CMake-3.22.1 | Unix Makefiles | x64 | Release | GCC-11.4.0 | โ |
Linux-Debug | ubuntu-latest | CMake-3.22.1 | Unix Makefiles | x64 | Debug | GCC-11.4.0 | โ |
MacOS-Release | macos-latest | Unix Makefiles | x64 | Release | โ | ||
MacOS-Debug | macos-latest | Xcode | x64 | Debug | โ |
[!NOTE]
qa
has subscribed to a remote VPS (KVM2 plan - 100Go) provided by Hostinger to run builds, tests and deployment on Linux. We could not find any server providers to run our builds and tests on MacOS and are listening to any suggestions ๐.
๐ Continuous Delivery
Our team delivers a release on a weekly basis:
- ~One major release per year (coming out with the current project)
- ~One minor release per month (coming out with the current feature)
- ~One patch release per week (coming out with the current issue)
To publish a new release, each tag created on our developement repository triggers a github actions that for each OS supported will create and upload the package to qa-demo. Here are the configurations on which we deploy our package:
Name | OS | CMake | Generator | Architecture | Build Type | Compiler | Status |
---|---|---|---|---|---|---|---|
Windows-Release | windows-latest | CMake-3.27.2 | MinGW Makefiles | x64 | Release | GCC-13.2.0 | โ |
Linux-Release | ubuntu-latest | CMake-3.22.1 | Unix Makefiles | x64 | Release | GCC-11.4.0 | โ |
MacOS-Release | macos-latest | Unix Makefiles | x64 | Release | โ |
[!IMPORTANT] We are far from being CD experts and know that our solution looks like a rush, better ways of releasing probably exist such as deploying binaries to a more convenient location than GitHub or building on a dedicated production environement. You are more than welcome to suggest improvements or just simply share your CD work styles.
๐ Licence
Copyright ยฉ 2023 QA - Quantitative Analytics. All rights reserved.
This file is part of the project QA - Quantitative Analytics.
Hence the latter remains the exclusive property of its author.
Accordingly, no part of this document may be used or transmitted
in any form for professional, educational or commercial purposes
without the express permission of Matthieu Charrier.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.