DataViews - Functions
TFire.DVVertical — MethodDVVertical(col::Collection{A}, dv, args...) where A <: AssetsDiscCreate a vertical dataview that splits timeseries data into "before" and "after" segments relative to each time point.
Arguments
col::Collection{A}: A collection of assets with discretized samplesdv: A function that creates a dataview for each assetargs...: Additional arguments passed to the dataview function
Returns
A DVVertical struct containing split views for each asset and date in the collection.
Access Patterns
For a returned dvv::DVVertical:
dvv[ticker][date][i]- Tuple of (before, after) views split at i-th timepointdvv[ticker][date][1][end]- Value at evaluation timedvv[ticker][date][1][end-1]- Value one tick before evaluationdvv[ticker][date][2][1]- Value one tick after evaluation
TFire.DVCheckBackAvailable — MethodDVCheckBackAvailable(tsdl::TSDLink, field::Symbol)Returns the maximum number of time steps that can be gone back, which is one less than the start index of the time series data.
TFire.DVLayerDictKey — MethodDVLayerDictKey(asset::Asset, dict::Symbol, key::Union{Int64, Symbol},layertype::Type{T}=AssetLayer) where T <: AssetLayer View of a key in a field dict of type Dict for layer of type `layertypeinassetThe datetimes are matched to those in theassetso thatDVLayerDictKey[x]gives the value in the dict of the layer field value corresponding toasset[x]`
TFire.DVLayerField — MethodDVLayerField(asset::Asset, field::Symbol, layer_type::Type{T}=AssetLayer) where T <: AssetLayerView of a field field for layer of type layer_type in asset The datetimes are matched to those in the asset so that DVLayerField[x] gives the layer field value corresponding to asset[x]
TFire.DVLayerGetFunc — MethodDVLayerGetFunc(asset::Asset, func::Function, layer_type::Type{T}=AssetLayer) where T <: AssetLayerThe function func applied to layer of type layer_type in asset The datetimes are matched to those in the asset so that DVLayerGetFunc[x] gives the function func func(asset.some_field[x])
TFire.DVLayerGetFuncPar — MethodDVLayerGetFuncPar(asset::Asset, func::Function, par::Any, layer_type::Type{T}=AssetLayer) where T <: AssetLayerThe function func that takes the additional parameter par applied to layer of type layer_type in asset The datetimes are matched to those in the asset so that DVLayerGetFuncPar[x] gives func(asset.some_field[x], par)
TFire.DVNonRepaintingLayerDictKey — MethodDVNonRepaintingLayerDictKey(asset::Asset, dict::Symbol, key::Union{Int64, Symbol}, layer_type::Type{T}=AssetLayer) where T <: AssetLayerView of a key in a field dict of type Dict for layer of type layer_type in asset
The datetimes are matched to those in the asset in a non repainting manner so that DVNonRepaintingLayerDictKey[1:end] equals the value in the dict of the layer field assets from minimum to maximum of all datetimes inasset`. Useful for constructing non repainting layers.
TFire.DVNonRepaintingTimeSeries — MethodDVNonRepaintingTimeSeries(asset::Asset, field::Symbol)View of data from associated time series in SFDB with the name symbol.
The datetimes are matched to those in the asset in a non repainting manner so that DVNonRepaintingTimeSeries[1:end] equals the time series assets from minimum to maximum of all datetimes inasset`. Useful for constructing non repainting layers.
TFire.DVNonRepaintingTimeSeriesBack — MethodDVNonRepaintingTimeSeriesBack(asset::Asset, field::Symbol, back::Int64)View of data from associated time series in SFDB with the name symbol.
The datetimes are matched to those in the asset in a non repainting manner so that DVNonRepaintingTimeSeriesBack[1:end] equals the time series assets from minimum to maximum of all datetimes inasset. Useful for constructing non repainting layers. Theback` variable represents the number of time steps to go back in time from the earlest datetime in the asset.
TFire.DVPriceSeries — MethodDVPriceSeries(asset::Asset, field::Symbol)View of data from associated price series in SFDB.
The datetimes are matched to those in the asset so that DVTimeSeries[x][y] gives the time series value corresponding to asset[x][y]
TFire.DVTimeSeries — MethodDVTimeSeries(asset::Asset, field::Symbol)View of data from associated time series in SFDB with the name field.
The datetimes are matched to those in the asset so that DVTimeSeries[x][y] gives the time series value corresponding to asset[x][y]
TFire.FutureAdjClose — MethodFutureAdjClose(asset::Asset)A view of adjusted close prices from the evaluation datetime and forward. The evaluated datetime is included. FutureAdjClose[x] gives a view of future adjusted close values from the evaluate datetime of asset[x]
TFire.FutureAdjCloseDay — MethodFutureAdjCloseDay(asset::Asset)A view of adjusted close prices from the evaluation date and forward at a daily resolution. The evaluated date is included. FutureAdjCloseDay[x] gives a view of future adjusted close values from the evaluate date of asset[x]. Useful for calculations of daily returns from decisions made on higher resolution time frames.
TFire.FutureAdjCloseEvalToDay — MethodFutureAdjCloseEvalToDay(asset::Asset)A view of adjusted close prices from the evaluation datetime and then forward at a daily resolution. FutureAdjCloseDayToEval[x] gives a view of future adjusted close values from the evaluate datetime of asset[x] where FutureAdjCloseEvalToDay[x][1] is the adj close of the evaluated datetime and FutureAdjCloseEvalToDay[2] is the adj close of the associated date. Then follows adj close on a daily resolution. Useful for calculations of daily returns from decisions made on higher resolution time frames.