Skip to content

Releases: MathisWellmann/lfest-rs

0.37

Choose a tag to compare

@MathisWellmann MathisWellmann released this 14 Nov 00:25

Changes include:

  • More accurate errors in regards to price filter rules.
  • Leverage::new returns the Result type now to avoid invalid values

0.35 Fill price information in `Order`

Choose a tag to compare

@MathisWellmann MathisWellmann released this 11 May 17:29
7524d9c
  • removes executed field from Order
  • Adds filled field (enum Filled) to Order for additional fill price information.

Two releases in one day? Check out the previous 0.34 release which is much more important.

0.34: ClearingHouse, RiskEngine, ContractSpecification and more

Choose a tag to compare

@MathisWellmann MathisWellmann released this 11 May 10:25
3da138d

This major redesign includes:

  • New RiskEngine trait with IsolatedMarginRiskEngine implementation
  • Improved limit order margining mechanism
  • ClearingHouse used to settle the transactions, acting as a central counterparty
  • ContractSpecification: Contains a few more configurations for the market
  • MarketState now contains the current market information
  • Many new methods with old ones removed
  • Removed Margin struct
  • Restructures internals heavily

This version requires consumers to call new methods, but the general principals stay the same.
Happy trading!

0.33

Choose a tag to compare

@MathisWellmann MathisWellmann released this 06 Apr 16:09
c7b2d11

Some minor API changes include:

  • Annualized sharpe and sortino ratios now return Decimal type.
  • Removed ReturnsSource:TickByTick as it had limited use and now its saving memory as well.

Order filters

Choose a tag to compare

@MathisWellmann MathisWellmann released this 05 Mar 19:29

Adds support for PriceFilter and QuantityFilter.
This ensures user orders and market data follow a set of rules.

Pricing rules include:

min_price: Defines the minimum price allowed. Disabled if min_price == 0
max_price: Defines the maximum price allowed. Disabled if max_price == 0
tick_size: Defines the intervals that a price can be increased / decreased by. For the filter to pass, (order.limit_price - min_price) % tick_size == 0
multiplier_up: Defines valid ranges for the order price relative to the mark price. To pass this filter, order.limit_price <= mark_price * multiplier_up
multiplier_down: Defines valid ranges for the order price relative to the mark price To pass this filter, order.limit_price >= mark_price * multiplier_down

Quantity rules:

min_quantity: Defines the minimum quantity of any order. Disabled if 0
max_quantity: Defines the maximum quantity of any order. Disabled if 0
step_size: Defines the intervals that a quantity can be increased / decreased by. For the filter to pass, (quantity - min_qty) % step_size == 0

Automatically infer futures type

Choose a tag to compare

@MathisWellmann MathisWellmann released this 04 Mar 19:39

Removes the FuturesType enum in favor of an automatic mechanism to infer the futures type through the configured margin currency.
The field starting_wb of Config defines the margin Currency to use which infers the futures type automatically.
The mapping is as follows:
QuoteCurrency -> linear futures contract
BaseCurrency -> inverse futures contract
This makes miss configuration impossible and is strictly better.

Fixed Point Arithmetic and NewType pattern

Choose a tag to compare

@MathisWellmann MathisWellmann released this 04 Mar 14:28

This major release touches every aspect of the codebase.

  1. The NewType pattern is used to enforce correct types at function boundaries.
    This introduces BaseCurrency, QuoteCurrency, Fee and Leverage so it is impossible to accidentally pass a value denoted in USD into a function that expect BTC for example.
  2. Use of fixed point arithmetic instead of f64 for fast and precise money calculations, thanks to the fpdec crate.
  3. Lots of smaller changes to harmonize the codebase

better way of setting bid, ask and timestamp

Choose a tag to compare

@MathisWellmann MathisWellmann released this 01 Jun 11:18

Added update_state(&self, bid: f64, ask: f64, timestamp: u64) method to Exchange for better handling and user defined bid and ask levels. This also removes the dependency to trade_aggregation-rs
Methods removed are:
consume_trade()
consume_candle()