Leveraged Futures Exchange for Simulated Trading (LFEST)

:warning: This is a personal project, use a your own risk.

:warning: The results may not represent real trading results on any given exchange.

lfest-rs is a simulated futures exchange capable of leveraged positions. It gets fed external bid ask data to update the internal state and check for order execution. For simplicity's sake (and performance) the exchange does not use an order book. Supported futures types are both linear and inverse futures.

Order Types

The supported order types are: - market - aggressively execute against the best bid / ask - limit - passively place an order into the orderbook

Performance Metrics:

The following performance metrics are available through AccTracker struct: - winratio - profitlossratio - totalrpnl - sharpe - sortino - cumulative fees - maxdrawdownwalletbalance - maxdrawdowntotal - numtrades - turnover - tradepercentage - buyratio - limitorderfillratio - limitordercancellationratio - historicalvalueatrisk - cornishfishervalueatrisk - dratio

Some of these metric may behave differently from what you would expect, so make sure to take a look at the code.

How to use

To use this crate in your project, add the following to your Cargo.toml: [dependencies] lfest = "0.24.0"

Then proceed to use it in your code. For an example see examples

TODOs:

Contributions

If you find a bug or would like to help out, feel free to create a pull-request.

Donations :moneybag: :moneywithwings:

I you would like to support the development of this crate, feel free to send over a donation:

Monero (XMR) address: plain 47xMvxNKsCKMt2owkDuN1Bci2KMiqGrAFCQFSLijWLs49ua67222Wu3LZryyopDVPYgYmAnYkSZSz9ZW2buaDwdyKTWGwwb

monero

License

Copyright (C) 2020

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

GNU AGPLv3