algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::strategy::PortfolioRows Class Reference

Where each instrument's rows are in one portfolio: its position rows and its working rows, in order. More...

#include <algotradelib/src/strategy/portfolio.hpp>

Classes

struct  Rows
 Where one instrument's rows are. More...

Public Member Functions

template<typename Broker>
 PortfolioRows (const Portfolio< Broker > &portfolio)
 Indexes a portfolio.
const Rows * of (const InstrumentId &instrument) const
 Returns where an instrument's rows are.

Detailed Description

Where each instrument's rows are in one portfolio: its position rows and its working rows, in order.

Built once for a pass that reconciles many targets against the same portfolio, so that each target finds its own rows instead of scanning all of them (see ReconcileInputs::rows_). Describes the portfolio it was built from only while that portfolio's positions_ and working_ are unchanged.

Definition at line 334 of file portfolio.hpp.

Constructor & Destructor Documentation

◆ PortfolioRows()

template<typename Broker>
algotradelib::strategy::PortfolioRows::PortfolioRows ( const Portfolio< Broker > & portfolio)
inlineexplicit

Indexes a portfolio.

Template Parameters
BrokerThe portfolio's broker tag.
Parameters
portfolioThe portfolio.

Definition at line 350 of file portfolio.hpp.

Member Function Documentation

◆ of()

const Rows * algotradelib::strategy::PortfolioRows::of ( const InstrumentId & instrument) const
inline

Returns where an instrument's rows are.

Parameters
instrumentThe instrument.
Returns
Its rows, or a null pointer if it has none.

Definition at line 364 of file portfolio.hpp.


The documentation for this class was generated from the following file: