Clarity is a framework for quickly and professionally R&D new strategies for equities and derivatives.
It is built on top of the powerful R programming language, providing bindings to C, C++ as well as the most popular databases.
Beyond R's standard functionalities (basic statistics, time series, statistical mechanics, chaos, etc), Clarity proposal offers a handful of possibilities to leverage algotraders from portfolio theory to arbitrage to high frequency trading.
Indicators and instruments are available for pre-loading and pre-calculation. Simulations can involve multiple instruments, either equities or derivatives, as well as multiple indicators, either pre-calculated or calculated on-the-fly.
Track position evolution throughout the trades and diagnose what are their behaviour.
All backend events are tracked in journaling. Journaling is a simplex channel to the frontend serving as a communication tool informing different notification levels, from warnings to errors.
Further applications include abnormality detection and error correction & recovery.
Position sizing is an important part in scaling the trading strategy and there are optimal ways to calculate the right amount for each strategy. Widely known position sizing methods are Kelly criteria and Optimal/Fractional/Secure F.
Act according to the position evolution using the basic or more elaborate techniques to cap risks.
- Stop Loss
- Take Profit
- Trailing stop and dynamic trailing stop.
- Languages: C, C++.
- Data providers: Quandl.
- Databases: Postgresql and all databases supported through DBI.
- Platforms: Matlab.
Further links will include S-plus, Mathematica, and Q (Kdb).
Comes with an extended triangular arbitrage module to spot latent arbitrage opportunities.
Facing either same or opposite directions, an one-axis view over events at different impact levels plays in important role on strategy's success.
Alike MetaTrader, the well known tool for retail traders, Clarity bundles the standard iteration loop begin()
-start()
-end()
, specially useful in HFT, and the traditional vector-based simulation, as in Matlab, in one single environment enabling both approaches to be used simultaneously.
Parameter optimisation can be performed using genetic algorithms, simulated annealing, and a few others depending on parameters restrictions.
Run
./setup
and follow the given instructions.