Collections
PlanarCore.Collections.InstrumentCollection — Type
A type representing a collection of asset instances.
Holds a DataFrame of asset instances indexed by exchange, asset, and instance. Thread-safe via internal ReentrantLock.
PlanarCore.TimeTicks.DateRange — Type
Makes a date range that spans the common minimum and maximum dates of the collection.
DateRange(
ac::PlanarCore.Collections.InstrumentCollection;
...
) -> PlanarCore.TimeTicks.DateRange
DateRange(
ac::PlanarCore.Collections.InstrumentCollection,
tf;
full,
kwargs...
) -> PlanarCore.TimeTicks.DateRange
The DateRange function takes the following parameters:
ac: an InstrumentCollection object which encapsulates a collection of assets.tf(optional): a TimeFrame object that represents a specific time frame. If not provided, the function will calculate the date range based on all time frames in the InstrumentCollection.skip_empty(optional, default is false): a boolean that indicates whether to skip empty data frames in the calculation of the date range.
PlanarCore.Collections._daterange_full — Function
Makes a date range that spans the union (earliest start to latest end) of the collection.
_daterange_full(
ac::PlanarCore.Collections.InstrumentCollection;
...
) -> PlanarCore.TimeTicks.DateRange
_daterange_full(
ac::PlanarCore.Collections.InstrumentCollection,
tf;
kwargs...
) -> PlanarCore.TimeTicks.DateRange
The daterange function returns a DateRange covering the earliest available timestamp and the latest available timestamp across all assets' OHLCV data in the InstrumentCollection.
Parameters:
ac: theInstrumentCollectiontf(optional): aTimeFrame. If not provided, it is inferred from the first asset instance
PlanarCore.Collections.bqe — Method
Dispatch based on either base, quote currency, or exchange.
PlanarCore.Collections.flatten — Method
Returns a dictionary of all the OHLCV dataframes present in the asset collection.
flatten(
ac::PlanarCore.Collections.InstrumentCollection;
noempty
) -> SortedDict{TimeFrames.TimeFrame, Vector{DataFrames.DataFrame}, Base.Order.ForwardOrdering}
The flatten function takes the following parameter:
ac: an InstrumentCollection object which encapsulates a collection of assets.
The function returns a SortedDict where the keys are TimeFrame objects and the values are vectors of DataFrames that represent OHLCV (Open, High, Low, Close, Volume) data. The dictionary is sorted by the TimeFrame keys.
PlanarCore.Collections.iscashable — Method
Checks that all assets in the universe match the cash currency.
iscashable(
c::PlanarCore.Instruments.AbstractCash,
ac::PlanarCore.Collections.InstrumentCollection
) -> Bool
The iscashable function takes the following parameters:
c: an AbstractCash object which encapsulates a representation of cash.ac: an InstrumentCollection object which encapsulates a collection of assets.
PlanarCore.Collections.prettydf — Method
Pretty prints the InstrumentCollection DataFrame.
prettydf(
ac::PlanarCore.Collections.InstrumentCollection;
full
) -> DataFrames.DataFrame
The prettydf function takes the following parameters:
ac: an InstrumentCollection object which encapsulates a collection of assets.full(optional, default is false): a boolean that indicates whether to print the full DataFrame. If true, the function prints the full DataFrame. If false, it prints a truncated version.