Skip to content

Commit

Permalink
More on forward-fill
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Mar 21, 2024
1 parent bb9359d commit 5b9c7c0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
23 changes: 20 additions & 3 deletions source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ and algorithmic trading.

- :term:`Bucket`

- :term:`Forward fill`

Time frame

See :term:`bucket`.
Expand Down Expand Up @@ -539,8 +541,22 @@ and algorithmic trading.

Dataset

A data bundle consisting of :term:`candles <candle>` or other quantitative data sources.
The most usual dataset is hourly or daily candles for multiple assets, distributed as a downloadable archive of several hundreds of megabytes.
In :term:`quantitative finance`, a dataset is a data bundle consisting of :term:`candles <candle>` or other quantitative data sources.
The most usual dataset is hourly or daily :term:`OHLCV` candles for multiple assets.

Datasets can be anywhere between megabytes to several gigabytes.

`See Trading Strategy free and open datasets <https://tradingstrategy.ai/trading-view/backtesting>`__.

See also

- :term:`OHLCV`

- :term:`Forward fill`

- :term:`Jupyter notebook`

- :term:`Machine learning`

Dataset server

Expand Down Expand Up @@ -3957,7 +3973,8 @@ and algorithmic trading.

Alternative methods for handling missing data include backward fill (carrying the next observed value backward) or more sophisticated imputation techniques that estimate missing values based on statistical methods or predictive models. The choice of method depends on the specific characteristics of the dataset and the objectives of the analysis.

The :term:`Trading Strategy Framework` gives you various :term:`Python` functions for forward-fill, especially for :term:`OHLCV` data. See :term:`documentation` for more info.
The :term:`Trading Strategy Framework` gives you various :term:`Python` functions for forward-fill, especially for :term:`OHLCV` data. See ref:`forward filling data`
in the documentation for more information.

See also

Expand Down
11 changes: 11 additions & 0 deletions source/programming/market-data/candle-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This is because we believe this formats fit better for DeFi market data feeds
Furthermore there are no opening and closing auctions as one might have
at stock markets.

.. forward filling data:
Forward filling data
--------------------

Expand All @@ -51,6 +53,15 @@ following:
- For any missing sparse timestamps, generate a candle where open/high/low
close are set the the volume to zero using :term:`forward fill`.

Some methods for forward fill your data:

- :py:meth:`tradeexecutor.strategy.trading_strategy_universe.TradingStrategyUniverse.create_from_dataset`
takes `forward_fill` argument (`False` by default). You can use this in your `create_trading_universe`
function to forward fill loaded data.

- For low-level forward filling see :py:func:`tradingstrategy.utils.groupeduniverse.resample_candles`
and :py:func:`tradingstrategy.utils.groupeduniverse.resample_series`.

Distinction between buys and sells
----------------------------------

Expand Down

0 comments on commit 5b9c7c0

Please sign in to comment.