API documentation for tradeexecutor.testing.synthetic_lending_data.generate_lending_universe Python function.

generate_lending_universe(bucket, start, end, reserves, aprs)[source]#

Generate sample lending time series data.

The output candles are deterministic: the same input parameters result to the same output parameters.

  • bucket (TimeBucket) – Time bucket to use for the candles

  • start (datetime) – Start time for the candles

  • end (datetime) – End time for the candles

  • reserves (list[tradingstrategy.lending.LendingReserve]) – List of reserves to generate candles for

  • aprs (dict[str, float]) – APRs to use for the candles

Return type:

tuple[tradingstrategy.lending.LendingReserveUniverse, tradingstrategy.lending.LendingCandleUniverse]