chapaty 1.1.1

An event-driven Rust engine for building and evaluating quantitative trading agents. Features a Gym-style API for algorithmic backtesting and reinforcement learning.
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)
    }
}