chapaty 1.0.0

High-performance backtesting and financial simulation framework for trading strategies and reinforcement learning agents. Async-first, Gym-like API in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt::Debug;

use crate::{
    data::view::MarketView,
    gym::trading::{action_space::ActionSpace, state::States},
};

#[derive(Debug, Clone)]
pub struct Observation<'env> {
    pub market_view: MarketView<'env>,
    pub states: &'env States,
}

impl<'env> Observation<'env> {
    pub fn action_space(self) -> ActionSpace<'env> {
        ActionSpace::new(self.states, self.market_view)
    }
}