FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::bt::TimeSliceSource Class Referencefinal

The events of inner in [t0, t1) of event time (exch_ts, recv_ts when unset), for walk-forward folds. More...

#include <fastmm/backtest/data_source.hpp>

Inheritance diagram for fastmm::bt::TimeSliceSource:

Public Member Functions

 TimeSliceSource (MdSource &inner, Timestamp t0, Timestamp t1)
 
 ~TimeSliceSource () override
 
 TimeSliceSource (const TimeSliceSource &)=delete
 
TimeSliceSource & operator= (const TimeSliceSource &)=delete
 
const EventHeader * next () override
 
void reset () override
 
Timestamp start_ts () const override
 

Detailed Description

The events of inner in [t0, t1) of event time (exch_ts, recv_ts when unset), for walk-forward folds.

The part before t0 is read but not yielded: it only rebuilds the book of every (venue, instrument) and keeps the last message of every other kind except trades, and those states come out first, stamped t0 (one BookSnapshot per book, then the rest in key order). A fold therefore starts on the book the full run would have had at t0. Ends at the first event at or after t1. inner is borrowed; reset() rewinds it.

Constructor & Destructor Documentation

◆ TimeSliceSource() [1/2]

fastmm::bt::TimeSliceSource::TimeSliceSource ( MdSource &  inner,
Timestamp  t0,
Timestamp  t1 
)

◆ ~TimeSliceSource()

fastmm::bt::TimeSliceSource::~TimeSliceSource ( )
override

◆ TimeSliceSource() [2/2]

fastmm::bt::TimeSliceSource::TimeSliceSource ( const TimeSliceSource &  )
delete

Member Function Documentation

◆ operator=()

TimeSliceSource & fastmm::bt::TimeSliceSource::operator= ( const TimeSliceSource &  )
delete

◆ next()

const EventHeader * fastmm::bt::TimeSliceSource::next ( )
override

◆ reset()

void fastmm::bt::TimeSliceSource::reset ( )
override

◆ start_ts()

Timestamp fastmm::bt::TimeSliceSource::start_ts ( ) const
inlineoverride