Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
Support

Group of support classes: string, variant, date_time, date, duration etc. More...

Classes

class  tsa::auto_cast_variant
 
class  tsa::date
 A date of the Gregorian calendar. More...
 
class  tsa::date_time
 Class representing a gregorian-date and time-of-day combination. The time component has microsecond resolution. More...
 
class  tsa::duration
 Represents a duration - the difference between two date_time values. More...
 
class  tsa::exception
 Class tsa::exception used by most classes of the Trading System API library. The class inherits from std::exception (standard C++ library). Class tsa::exception extends std::exception by including the file and line number of the code that originated the exception in the exception message. More...
 
struct  tsa::library
 Contains the library's copyright notice as well as version information. More...
 
class  tsa::object
 Parent class for many library classes. More...
 
class  tsa::os::path
 Utility class to manipulate file system paths. This class is intended to fulfil the requirements of the Trading System API library. For more comprehensive functionality it is recommended to use a library such as 'boost::filesystem'. More...
 
class  tsa::series_bounds_error
 Exception class thrown by series when insufficient data. More...
 
class  tsa::string_splitter
 Support class for splitting 'record' strings into 'fields' using separator characters such as ','. More...
 
class  tsa::variant
 variant objects can represent values of different types. More...
 

Macros

#define SLOC   tsa::exception::source_location(__FILE__, __LINE__)
 Macro to be passed as argument to Exception constructors. Contains information about the source location that raised the exception.
 

Enumerations

Functions

date_time tsa::max (const date_time &left, const date_time &right)
 Determines the larger (later) of the two time-points. Will return a value even if both time-points are identical. More...
 
date_time tsa::min (const date_time &left, const date_time &right)
 Determines the smaller (earlier) of the two time-points. Will return a value even if both time-points are identical. More...
 
date tsa::operator+ (const date &date, const duration &num_days)
 Adds num_days to self. The microsecond property of the given timespan must be zero or an exception is thrown. More...
 
date tsa::operator- (const date &Left, const duration &numDays)
 Subtracts num_days from self. The microsecond property of the given timespan must be zero or an exception is thrown. More...
 
path tsa::os::operator/ (const os::path &a, const os::path &b)
 Returns a new path object as the result of joining paths a and b.
 
std::ostream & tsa::os::operator<< (std::ostream &s, const os::path &p)
 Writs p to stream s.
 
std::ostream & operator<< (std::ostream &stream, const date &date)
 Writes date to stream in "yyyy-mm-dd" format. If the date is undefined, output is "[undefined-date]". More...
 
std::ostream & operator<< (std::ostream &stream, const variant &var)
 Writes var to stream as text. More...
 
std::ostream & operator<< (std::ostream &stream, const date_time &datetime)
 Writes datetime to stream as a string, formated as 'yyyy-mm-ddThh:mm:ss.f'. More...
 
std::ostream & tsa::operator<< (std::ostream &stream, const duration &ts)
 Writes ts to stream as a string.
 

Detailed Description

Group of support classes: string, variant, date_time, date, duration etc.

Enumeration Type Documentation

Flag to set time to either 'local time' or 'coordinate universal time'.

Enumerator
utc_time 
local_time 

Values that represent set timezone offset selects.

Enumerator
with_timezone_offset 
no_timezone_offset 

Function Documentation

date_time tsa::max ( const date_time left,
const date_time right 
)

Determines the larger (later) of the two time-points. Will return a value even if both time-points are identical.

Parameters
leftThe left time-point.
rightThe right time-point.
Returns
The larger time-point.
date_time tsa::min ( const date_time left,
const date_time right 
)

Determines the smaller (earlier) of the two time-points. Will return a value even if both time-points are identical.

Parameters
leftThe left time-point.
rightThe right time-point.
Returns
The smaller time-point.
date tsa::operator+ ( const date date,
const duration num_days 
)

Adds num_days to self. The microsecond property of the given timespan must be zero or an exception is thrown.

Adds num_days to self. The given duration must not have an intraday component.

Parameters
dateThe date to which num_days are added.
num_daysThe number of days to add.
Returns
date
date tsa::operator- ( const date _left,
const duration _right 
)

Subtracts num_days from self. The microsecond property of the given timespan must be zero or an exception is thrown.

Subtracts num_days from self. The given duration must not have an intraday component.

std::ostream & operator<< ( std::ostream &  stream,
const date date 
)
related

Writes date to stream in "yyyy-mm-dd" format. If the date is undefined, output is "[undefined-date]".

std::ostream & operator<< ( std::ostream &  stream,
const variant var 
)
related

Writes var to stream as text.

std::ostream & operator<< ( std::ostream &  stream,
const date_time datetime 
)
related

Writes datetime to stream as a string, formated as 'yyyy-mm-ddThh:mm:ss.f'.

If the datetime is not defined, the function outputs "[date_time undefined]".

Parameters
[in,out]streamThe stream.
datetimeThe datetime.
Returns
stream reference.