From 35a35a02c3c78dee2c27d98327d4e27c0923327d Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Fri, 5 Apr 2024 02:12:47 -0400 Subject: [PATCH] docs: Update guide (#366) Signed-off-by: Dave Skender <8432125+DaveSkender@users.noreply.github.com> --- docs/pages/guide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/guide.md b/docs/pages/guide.md index 7f018719..547c589b 100644 --- a/docs/pages/guide.md +++ b/docs/pages/guide.md @@ -125,15 +125,15 @@ There are many places to get stock market data. Check with your brokerage or ot ### How much historical quote data do I need? -Each indicator will need different amounts of price `quotes` to calculate. You can find guidance on the individual indicator documentation pages for minimum requirements; however, **most use cases will require that you provide more than the minimum**. As a general rule of thumb, you will be safe if you provide 750 points of historical quote data (e.g. 3 years of daily data). A `BadQuotesException` will be thrown if you do not provide sufficient historical quotes to produce any results. +Each indicator will need different amounts of price `quotes` to calculate. You can find guidance on the individual indicator documentation pages for minimum requirements; however, **most use cases will require that you provide more than the minimum**. As a general rule of thumb, you will be safe if you provide 750 points of historical quote data (e.g. 3 years of daily data). ->🚩 IMPORTANT! Some indicators use a smoothing technique that converges to better precision over time. While you can calculate these with the minimum amount of quote data, the precision to two decimal points often requires 250 or more preceding historical records. - -For example, if you are using daily data and want one year of precise EMA(250) data, you need to provide 3 years of historical quotes (1 extra year for the lookback period and 1 extra year for convergence); thereafter, you would discard or not use the first two years of results. Occassionally, even more is required for optimal precision. +> 🚩 **IMPORTANT! Applying the _minimum_ amount of quote history as possible is NOT a good way to optimize your system.** Some indicators use a smoothing technique that converges to better precision over time. While you can calculate these with the minimum amount of quote data, the precision to two decimal points often requires 250 or more preceding historical records. +> +> For example, if you are using daily data and want one year of precise EMA(250) data, you need to provide 3 years of historical quotes (1 extra year for the lookback period and 1 extra year for convergence); thereafter, you would discard or not use the first two years of results. Occasionally, even more is required for optimal precision. ### Using pandas.DataFrame -If you are using `pandas.DataFrame` to hold quote data, you have to convert it into an iterable `Quote` list. Here's [an efficient way](https://towardsdatascience.com/efficiently-iterating-over-rows-in-a-pandas-dataframe-7dd5f9992c01) to iterate `Dataframe` using _list comprehension_. +If you are using `pandas.DataFrame` to hold quote data, you have to convert it into an iterable `Quote` list. Here's [an efficient way](https://towardsdatascience.com/efficiently-iterating-over-rows-in-a-pandas-dataframe-7dd5f9992c01) to iterate `DataFrame` using _list comprehension_. ```python # Suppose that you have dataframe like the below.