tzutrader
A composable C++ backtesting library for trading strategies (experimental)
Loading...
Searching...
No Matches
defs.h File Reference

Core data structures and types for the tzutrader library. More...

#include <cstdint>
#include <cmath>
#include <ostream>

Go to the source code of this file.

Classes

struct  tzu::Signal
 Trading signal generated by a strategy. More...
struct  tzu::Ohlcv
 Open-High-Low-Close-Volume candlestick data. More...
struct  tzu::Tick
struct  tzu::SingleValue
struct  tzu::Position
struct  tzu::Trade
struct  tzu::PerformanceMetrics
struct  tzu::BuyAndHoldMetrics

Namespaces

namespace  tzu

Enumerations

enum class  tzu::Side { tzu::BUY , tzu::SELL , tzu::NONE }
 Trade direction enumeration. More...
enum class  tzu::OhlcvField {
  tzu::OPEN , tzu::HIGH , tzu::LOW , tzu::CLOSE ,
  tzu::VOLUME
}
 Field selector for OHLCV data. More...
enum class  tzu::DataType { tzu::OHLCV , tzu::TICK , tzu::SINGLE_VALUE }
enum class  tzu::TimeInterval {
  tzu::NANOSECONDS , tzu::MICROSECONDS , tzu::MILLISECONDS , tzu::SECONDS ,
  tzu::MINUTES , tzu::HOURS , tzu::DAYS , tzu::WEEKS ,
  tzu::MONTHS , tzu::YEARS
}

Functions

std::ostream & operator<< (std::ostream &os, const tzu::Signal &signal)

Detailed Description

Core data structures and types for the tzutrader library.

This header defines the fundamental data types used throughout the library, including market data structures (Ohlcv, Tick), trading signals, and enumeration types for trade direction.

These structures are designed to be lightweight and efficient for streaming data processing.

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const tzu::Signal & signal )
inline

Overload the output stream operator for the Signal struct to enable easy printing or streaming of signal information.