diff --git a/docs/_indicators/Dpo.md b/docs/_indicators/Dpo.md new file mode 100644 index 000000000..bc3e18551 --- /dev/null +++ b/docs/_indicators/Dpo.md @@ -0,0 +1,67 @@ +--- +title: Detrended Price Oscillator (DPO) +permalink: /indicators/Dpo/ +layout: default +--- + +# {{ page.title }} + +[Detrended Price Oscillator](https://en.wikipedia.org/wiki/Detrended_price_oscillator) depicts the difference between price and an offset simple moving average. It is used to identify trend cycles and duration. +[[Discuss] :speech_balloon:]({{site.github.repository_url}}/discussions/551 "Community discussion about this indicator") + +![image]({{site.baseurl}}/assets/charts/Dpo.png) + +```csharp +// usage +IEnumerable results = + quotes.GetDpo(lookbackPeriods); +``` + +## Parameters + +| name | type | notes +| -- |-- |-- +| `lookbackPeriods` | int | Number of periods (`N`) in the moving average. Must be greater than 0. + +### Historical quotes requirements + +You must have at least `N` historical quotes. + +`quotes` is an `IEnumerable` collection of historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See [the Guide]({{site.baseurl}}/guide#historical-quotes) for more information. + +## Response + +```csharp +IEnumerable +``` + +- This method returns a time series of all available indicator values for the `quotes` provided. +- It always returns the same number of elements as there are in the historical quotes. +- It does not return a single incremental indicator value. +- The first `N/2-2` and last `N/2+1` periods will be `null` since they cannot be calculated. + +### DpoResult + +| name | type | notes +| -- |-- |-- +| `Date` | DateTime | Date +| `Sma` | decimal | Simple moving average offset by `N/2+1` periods +| `Dpo` | decimal | Detrended Price Oscillator (DPO) + +### Utilities + +- [.ConvertToQuotes()]({{site.baseurl}}/utilities#convert-to-quotes) +- [.Find(lookupDate)]({{site.baseurl}}/utilities#find-indicator-result-by-date) +- [.RemoveWarmupPeriods(qty)]({{site.baseurl}}/utilities#remove-warmup-periods) + +See [Utilities and Helpers]({{site.baseurl}}/utilities#utilities-for-indicator-results) for more information. + +## Example + +```csharp +// fetch historical quotes from your feed (your method) +IEnumerable quotes = GetHistoryFromFeed("SPY"); + +// calculate +IEnumerable results = quotes.GetDpo(14); +``` diff --git a/docs/assets/charts/Dpo.png b/docs/assets/charts/Dpo.png new file mode 100644 index 000000000..3371d6879 Binary files /dev/null and b/docs/assets/charts/Dpo.png differ diff --git a/docs/indicators.md b/docs/indicators.md index 1c4af8d48..0d528f1c8 100644 --- a/docs/indicators.md +++ b/docs/indicators.md @@ -46,6 +46,7 @@ redirect_from: - [ConnorsRSI](../indicators/ConnorsRsi/#content) - [Commodity Channel Index](../indicators/Cci/#content) +- [Detrended Price Oscillator (DPO)](../indicators/Dpo/#content) - [Relative Strength Index (RSI)](../indicators/Rsi/#content) - [ROC with Bands](../indicators/Roc/#roc-with-bands) - [Stochastic Oscillator](../indicators/Stoch/#content) and [KDJ Index](../indicators/Stoch/#content) diff --git a/src/A-D/Dpo/Dpo.Models.cs b/src/A-D/Dpo/Dpo.Models.cs new file mode 100644 index 000000000..a1634d680 --- /dev/null +++ b/src/A-D/Dpo/Dpo.Models.cs @@ -0,0 +1,11 @@ +using System; + +namespace Skender.Stock.Indicators +{ + [Serializable] + public class DpoResult : ResultBase + { + public decimal? Sma { get; set; } + public decimal? Dpo { get; set; } + } +} diff --git a/src/A-D/Dpo/Dpo.cs b/src/A-D/Dpo/Dpo.cs new file mode 100644 index 000000000..fea9ca5e1 --- /dev/null +++ b/src/A-D/Dpo/Dpo.cs @@ -0,0 +1,102 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Skender.Stock.Indicators +{ + public static partial class Indicator + { + // DETRENDED PRICE OSCILLATOR (DPO) + /// + /// + public static IEnumerable GetDpo( + this IEnumerable quotes, + int lookbackPeriods) + where TQuote : IQuote + { + + // sort quotes + List quotesList = quotes.Sort(); + + // check parameter arguments + ValidateDpo(quotes, lookbackPeriods); + + // initialize + int size = quotesList.Count; + int offset = lookbackPeriods / 2 + 1; + List sma = quotes.GetSma(lookbackPeriods).ToList(); + List results = new(size); + + // roll through quotes + for (int i = 0; i < size; i++) + { + TQuote q = quotesList[i]; + + DpoResult r = new() + { + Date = q.Date + }; + results.Add(r); + + if (i >= lookbackPeriods - offset - 1 && i < size - offset) + { + SmaResult s = sma[i + offset]; + r.Sma = s.Sma; + r.Dpo = q.Close - s.Sma; + } + } + + return results; + } + + + // convert to quotes + /// + /// + public static IEnumerable ConvertToQuotes( + this IEnumerable results) + { + return results + .Where(x => x.Dpo != null) + .Select(x => new Quote + { + Date = x.Date, + Open = (decimal)x.Dpo, + High = (decimal)x.Dpo, + Low = (decimal)x.Dpo, + Close = (decimal)x.Dpo, + Volume = (decimal)x.Dpo + }) + .ToList(); + } + + + // parameter validation + private static void ValidateDpo( + IEnumerable quotes, + int lookbackPeriods) + where TQuote : IQuote + { + + // check parameter arguments + if (lookbackPeriods <= 0) + { + throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, + "Lookback periods must be greater than 0 for DPO."); + } + + // check quotes + int qtyHistory = quotes.Count(); + int minHistory = lookbackPeriods; + if (qtyHistory < minHistory) + { + string message = string.Format(EnglishCulture, + "Insufficient quotes provided for Detrended Price Oscillator. " + + "You provided {0} periods of quotes when at least {1} are required.", + qtyHistory, minHistory); + + throw new BadQuotesException(nameof(quotes), message); + } + } + } +} diff --git a/src/A-D/Dpo/info.xml b/src/A-D/Dpo/info.xml new file mode 100644 index 000000000..ab23025d7 --- /dev/null +++ b/src/A-D/Dpo/info.xml @@ -0,0 +1,16 @@ + + + + + Detrended Price Oscillator (DPO) depicts the difference between price and an offset simple moving average. + See + documentation + for more information. + + Configurable Quote type. See Guide for more information. + Historical price quotes. + Number of periods in the lookback window. + Time series of DPO values. + Invalid parameter value provided. + Insufficient quotes provided. + diff --git a/tests/indicators/A-D/Dpo/Dpo.Calc.xlsx b/tests/indicators/A-D/Dpo/Dpo.Calc.xlsx new file mode 100644 index 000000000..b107a40b2 Binary files /dev/null and b/tests/indicators/A-D/Dpo/Dpo.Calc.xlsx differ diff --git a/tests/indicators/A-D/Dpo/Test.Dpo.cs b/tests/indicators/A-D/Dpo/Test.Dpo.cs new file mode 100644 index 000000000..6f8c32cff --- /dev/null +++ b/tests/indicators/A-D/Dpo/Test.Dpo.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Skender.Stock.Indicators; + +namespace Internal.Tests +{ + [TestClass] + public class Dpo : TestBase + { + [TestMethod] + public void Standard() + { + List act = quotes.GetDpo(14) + .ToList(); + + // get test data + List exp = File.ReadAllLines("A-D/Dpo/data.csv") + .Skip(1) + .Select(t => + { + string[] csv = t.Split(","); + return new DpoResult + { + Date = Convert.ToDateTime(csv[1], englishCulture), + Sma = decimal.TryParse(csv[6], out decimal sma) ? sma : null, + Dpo = decimal.TryParse(csv[7], out decimal dpo) ? dpo : null + }; + }) + .ToList(); + + // assertions + Assert.AreEqual(exp.Count, act.Count); + + // compare all values + for (int i = 0; i < exp.Count; i++) + { + DpoResult e = exp[i]; + DpoResult a = act[i]; + + Assert.AreEqual(e.Date, a.Date); + Assert.AreEqual(e.Sma, a.Sma == null + ? a.Sma + : Math.Round((decimal)a.Sma, 5), + $"at index {i}"); + Assert.AreEqual(e.Dpo, a.Dpo == null + ? a.Dpo + : Math.Round((decimal)a.Dpo, 5), + $"at index {i}"); + } + } + + [TestMethod] + public void ConvertToQuotes() + { + List newQuotes = quotes.GetDpo(14) + .ConvertToQuotes() + .ToList(); + + Assert.AreEqual(489, newQuotes.Count); + + Quote q = newQuotes.LastOrDefault(); + Assert.AreEqual(2.18214m, Math.Round(q.Close, 5)); + } + + [TestMethod] + public void BadData() + { + IEnumerable r = badQuotes.GetDpo(5); + Assert.AreEqual(502, r.Count()); + } + + [TestMethod] + public void Exceptions() + { + // bad SMA period + Assert.ThrowsException(() => + quotes.GetDpo(0)); + + // insufficient quotes + Assert.ThrowsException(() => + Indicator.GetDpo(TestData.GetDefault(10), 11)); + } + } +} diff --git a/tests/indicators/A-D/Dpo/data.csv b/tests/indicators/A-D/Dpo/data.csv new file mode 100644 index 000000000..01b678c6b --- /dev/null +++ b/tests/indicators/A-D/Dpo/data.csv @@ -0,0 +1,503 @@ +i,date,open,high,low,close,sma,dpo +0,2017-01-03,212.61,213.35,211.52,212.8,, +1,2017-01-04,213.16,214.22,213.15,214.06,, +2,2017-01-05,213.77,214.06,213.02,213.89,, +3,2017-01-06,214.02,215.17,213.42,214.66,, +4,2017-01-09,214.38,214.53,213.91,213.95,, +5,2017-01-10,213.97,214.89,213.52,213.95,213.97571,-0.02571 +6,2017-01-11,213.86,214.55,213.13,214.55,214.13500,0.41500 +7,2017-01-12,213.99,214.22,212.53,214.02,214.33714,-0.31714 +8,2017-01-13,214.21,214.84,214.17,214.51,214.53500,-0.02500 +9,2017-01-17,213.81,214.25,213.33,213.75,214.65357,-0.90357 +10,2017-01-18,214.02,214.27,213.42,214.22,214.72714,-0.50714 +11,2017-01-19,214.31,214.46,212.96,213.43,214.79929,-1.36929 +12,2017-01-20,214.18,214.75,213.49,214.21,214.83500,-0.62500 +13,2017-01-23,213.85,214.28,212.83,213.66,214.91857,-1.25857 +14,2017-01-24,213.89,215.48,213.77,215.03,215.07286,-0.04286 +15,2017-01-25,216.07,216.89,215.89,216.89,215.25357,1.63643 +16,2017-01-26,216.73,217.02,216.36,216.66,215.40143,1.25857 +17,2017-01-27,216.75,216.91,216.12,216.32,215.62643,0.69357 +18,2017-01-30,215.57,215.59,213.9,214.98,215.88714,-0.90714 +19,2017-01-31,214.44,215.03,213.82,214.96,216.24857,-1.28857 +20,2017-02-01,215.65,215.96,214.4,215.05,216.59714,-1.54714 +21,2017-02-02,214.65,215.5,214.29,215.19,216.87571,-1.68571 +22,2017-02-03,216.18,216.87,215.84,216.67,217.25286,-0.58286 +23,2017-02-06,216.23,216.66,215.92,216.28,217.64071,-1.36071 +24,2017-02-07,216.71,216.97,216.09,216.29,218.14929,-1.85929 +25,2017-02-08,215.98,216.72,215.7,216.58,218.75429,-2.17429 +26,2017-02-09,216.88,218.19,216.84,217.86,219.33857,-1.47857 +27,2017-02-10,218.24,218.97,217.88,218.72,219.92357,-1.20357 +28,2017-02-13,219.26,220.19,219.23,219.91,220.42286,-0.51286 +29,2017-02-14,219.71,220.8,219.33,220.79,220.97500,-0.18500 +30,2017-02-15,220.55,222.15,220.5,221.94,221.48357,0.45643 +31,2017-02-16,221.98,222.16,220.93,221.75,222.19429,-0.44429 +32,2017-02-17,221.03,222.1,221.01,222.1,222.71214,-0.61214 +33,2017-02-21,222.51,223.62,222.5,223.43,223.17857,0.25143 +34,2017-02-22,222.98,223.47,222.8,223.23,223.51214,-0.28214 +35,2017-02-23,223.79,223.81,222.55,223.38,223.73500,-0.35500 +36,2017-02-24,222.45,223.71,222.41,223.66,223.84571,-0.18571 +37,2017-02-27,223.57,224.2,223.29,224.01,223.99071,0.01929 +38,2017-02-28,223.6,223.86,222.98,223.41,224.16643,-0.75643 +39,2017-03-01,225.22,227.04,225.2,226.53,224.25500,2.27500 +40,2017-03-02,226.33,226.34,225.05,225.11,224.29643,0.81357 +41,2017-03-03,225.01,225.43,224.6,225.25,224.46571,0.78429 +42,2017-03-06,224.38,224.97,223.92,224.58,224.58357,-0.00357 +43,2017-03-07,224.25,224.64,223.68,223.91,224.64786,-0.73786 +44,2017-03-08,224.23,224.51,223.34,223.49,224.73714,-1.24714 +45,2017-03-09,223.62,224.13,222.72,223.78,224.39786,-0.61786 +46,2017-03-10,224.82,224.87,223.52,224.56,224.19714,0.36286 +47,2017-03-13,224.49,224.72,224.13,224.67,223.96929,0.70071 +48,2017-03-14,224.08,224.13,223.14,223.81,223.77786,0.03214 +49,2017-03-15,224.44,226.21,224.18,225.75,223.61786,2.13214 +50,2017-03-16,225.9,225.99,224.95,225.31,223.60357,1.70643 +51,2017-03-17,225.59,225.8,224.91,224.91,223.58357,1.32643 +52,2017-03-20,224.91,225.22,224.24,224.66,223.55857,1.10143 +53,2017-03-21,225.33,225.46,221.64,221.78,223.48857,-1.70857 +54,2017-03-22,221.82,222.61,221.13,222.3,223.45214,-1.15214 +55,2017-03-23,222.04,223.31,221.66,222.06,223.28714,-1.22714 +56,2017-03-24,222.4,223.02,221.05,221.9,223.10643,-1.20643 +57,2017-03-27,220.07,221.96,219.77,221.67,222.99857,-1.32857 +58,2017-03-28,221.34,223.75,221.22,223.29,222.89214,0.39786 +59,2017-03-29,222.97,223.75,222.72,223.5,223.00143,0.49857 +60,2017-03-30,223.43,224.43,223.24,224.21,223.05429,1.15571 +61,2017-03-31,223.84,224.42,223.63,223.69,223.05429,0.63571 +62,2017-04-03,223.74,223.96,221.95,223.3,222.96286,0.33714 +63,2017-04-04,222.98,223.53,222.56,223.44,223.02786,0.41214 +64,2017-04-05,224.18,225.25,222.55,222.78,222.92929,-0.14929 +65,2017-04-06,222.93,223.97,222.44,223.4,222.78643,0.61357 +66,2017-04-07,223.13,223.93,222.64,223.17,222.72214,0.44786 +67,2017-04-10,223.33,224.18,222.73,223.31,222.64429,0.66571 +68,2017-04-11,222.89,223.15,221.41,223.04,222.76857,0.27143 +69,2017-04-12,222.74,222.95,221.82,222.06,222.97643,-0.91643 +70,2017-04-13,221.69,222.5,220.62,220.62,223.22143,-2.60143 +71,2017-04-17,221.19,222.58,220.97,222.58,223.43571,-0.85571 +72,2017-04-18,221.77,222.5,221.16,221.91,223.63143,-1.72143 +73,2017-04-19,222.53,222.94,221.26,221.5,223.85786,-2.35786 +74,2017-04-20,222.18,223.79,221.83,223.31,224.10929,-0.79929 +75,2017-04-21,223.22,223.28,222.16,222.6,224.41143,-1.81143 +76,2017-04-24,225.05,225.27,222.57,225.04,224.83500,0.20500 +77,2017-04-25,225.75,226.73,225.65,226.35,225.18214,1.16786 +78,2017-04-26,226.31,227.28,226.16,226.21,225.57500,0.63500 +79,2017-04-27,226.56,226.73,225.81,226.4,225.98214,0.41786 +80,2017-04-28,226.68,226.71,225.76,225.91,226.28929,-0.37929 +81,2017-05-01,226.48,226.94,226.02,226.48,226.61357,-0.13357 +82,2017-05-02,226.63,226.76,226.12,226.56,226.73643,-0.17643 +83,2017-05-03,226.11,226.66,225.55,226.29,226.85500,-0.56500 +84,2017-05-04,226.62,226.71,225.62,226.55,226.96857,-0.41857 +85,2017-05-05,226.96,227.46,226.48,227.44,226.78000,0.66000 +86,2017-05-08,227.49,227.65,226.94,227.41,226.69071,0.71929 +87,2017-05-09,227.69,227.91,226.82,227.2,226.66500,0.53500 +88,2017-05-10,227.15,227.61,226.92,227.61,226.71571,0.89429 +89,2017-05-11,227.11,227.32,225.95,227.14,226.82214,0.31786 +90,2017-05-12,226.87,227.19,226.47,226.76,226.94786,-0.18786 +91,2017-05-15,227.23,228.15,227.21,228.01,227.08786,0.92214 +92,2017-05-16,228.34,228.36,227.38,227.8,227.22643,0.57357 +93,2017-05-17,225.93,226.44,223.7,223.76,227.36571,-3.60571 +94,2017-05-18,223.68,225.59,223.39,224.66,227.47143,-2.81143 +95,2017-05-19,225.2,226.86,225.14,226.12,227.74143,-1.62143 +96,2017-05-22,226.68,227.45,226.61,227.27,228.09357,-0.82357 +97,2017-05-23,227.68,227.96,227.26,227.78,228.34357,-0.56357 +98,2017-05-24,228.03,228.42,227.66,228.31,228.55571,-0.24571 +99,2017-05-25,228.87,229.7,228.64,229.4,229.08714,0.31286 +100,2017-05-26,229.19,229.53,229.1,229.35,229.56286,-0.21286 +101,2017-05-30,229,229.43,228.83,229.15,229.90857,-0.75857 +102,2017-05-31,229.47,229.51,228.34,229.09,230.16929,-1.07929 +103,2017-06-01,229.6,230.94,229.28,230.92,230.47429,0.44571 +104,2017-06-02,230.97,231.86,230.65,231.69,230.72000,0.97000 +105,2017-06-05,231.5,231.81,231.3,231.51,230.85643,0.65357 +106,2017-06-06,230.9,231.51,230.69,230.77,231.00000,-0.23000 +107,2017-06-07,231.14,231.45,230.41,231.2,231.29500,-0.09500 +108,2017-06-08,231.31,231.84,230.74,231.32,231.48214,-0.16214 +109,2017-06-09,231.61,232.48,229.58,230.96,231.53429,-0.57429 +110,2017-06-12,230.7,230.97,229.99,230.92,231.52429,-0.60429 +111,2017-06-13,231.51,232.1,231.13,232.05,231.54643,0.50357 +112,2017-06-14,232.34,232.35,230.85,231.75,231.63286,0.11714 +113,2017-06-15,230.27,231.44,229.97,231.31,231.55500,-0.24500 +114,2017-06-16,231.48,231.54,230.4,231.36,231.61571,-0.25571 +115,2017-06-19,232.26,233.35,232.16,233.28,231.55643,1.72357 +116,2017-06-20,232.89,232.9,231.69,231.71,231.53071,0.17929 +117,2017-06-21,232.1,232.26,231.14,231.65,231.45214,0.19786 +118,2017-06-22,231.66,232.21,231.36,231.55,231.43286,0.11714 +119,2017-06-23,231.61,232.19,231.19,231.82,231.29357,0.52643 +120,2017-06-26,232.56,233.02,231.74,231.98,231.25714,0.72286 +121,2017-06-27,231.74,232.06,230.09,230.11,231.10143,-0.99143 +122,2017-06-28,231.22,232.38,230.97,232.17,231.04571,1.12429 +123,2017-06-29,232.33,232.39,228.8,230.13,231.11786,-0.98786 +124,2017-06-30,231.01,231.42,230.34,230.56,231.22500,-0.66500 +125,2017-07-03,231.59,232.06,230.95,230.95,231.39071,-0.44071 +126,2017-07-05,231.35,231.71,230.46,231.48,231.54286,-0.06286 +127,2017-07-06,230.64,230.77,229.16,229.36,231.83786,-2.47786 +128,2017-07-07,229.99,231.01,229.38,230.85,232.07571,-1.22571 +129,2017-07-10,230.7,231.51,230.52,231.1,232.46714,-1.36714 +130,2017-07-11,230.9,231.27,229.65,230.93,232.81286,-1.88286 +131,2017-07-12,231.99,232.84,231.99,232.66,233.12643,-0.46643 +132,2017-07-13,232.67,233.18,232.42,233.05,233.44286,-0.39286 +133,2017-07-14,233.06,234.53,232.95,234.14,233.91143,0.22857 +134,2017-07-17,234.05,234.47,233.92,234.11,234.25786,-0.14786 +135,2017-07-18,233.66,234.29,233.29,234.24,234.56714,-0.32714 +136,2017-07-19,234.58,235.51,234.57,235.5,234.87857,0.62143 +137,2017-07-20,235.78,235.91,235.01,235.61,235.10429,0.50571 +138,2017-07-21,234.98,235.43,234.73,235.4,235.31000,0.09000 +139,2017-07-24,235.31,235.49,234.83,235.34,235.40571,-0.06571 +140,2017-07-25,236.16,236.28,235.67,235.91,235.53357,0.37643 +141,2017-07-26,236.23,236.27,235.64,235.92,235.68357,0.23643 +142,2017-07-27,236.43,236.47,234.26,235.7,235.70214,-0.00214 +143,2017-07-28,235.18,235.57,234.68,235.43,235.71214,-0.28214 +144,2017-07-31,235.87,235.97,235.07,235.29,235.49929,-0.20929 +145,2017-08-01,235.95,235.99,235.24,235.82,235.31571,0.50429 +146,2017-08-02,235.96,236.09,234.91,235.93,235.25571,0.67429 +147,2017-08-03,235.81,235.84,235.17,235.48,235.19357,0.28643 +148,2017-08-04,236.01,236.27,235.49,235.9,235.17643,0.72357 +149,2017-08-07,235.98,236.34,235.87,236.34,234.91643,1.42357 +150,2017-08-08,236,237.33,235.35,235.76,234.64000,1.12000 +151,2017-08-09,235.01,235.81,234.62,235.75,234.33857,1.41143 +152,2017-08-10,234.84,234.98,232.37,232.42,234.20286,-1.78286 +153,2017-08-11,232.67,233.42,232.41,232.77,234.03929,-1.26929 +154,2017-08-14,234.17,235.31,234.13,235.07,233.80643,1.26357 +155,2017-08-15,235.49,235.51,234.71,235.05,233.58143,1.46857 +156,2017-08-16,235.62,236.06,234.99,235.46,233.39857,2.06143 +157,2017-08-17,234.79,235.13,231.79,231.79,233.23500,-1.44500 +158,2017-08-18,231.6,232.83,230.94,231.42,233.38857,-1.96857 +159,2017-08-21,231.36,231.89,230.58,231.6,233.61786,-2.01786 +160,2017-08-22,232.24,234.2,232.22,234.03,233.70643,0.32357 +161,2017-08-23,232.97,233.65,232.81,233.19,233.67571,-0.48571 +162,2017-08-24,233.61,233.78,232.41,232.64,233.67286,-1.03286 +163,2017-08-25,233.51,234.19,233.02,233.19,233.93000,-0.74000 +164,2017-08-28,233.77,233.8,232.74,233.2,234.19357,-0.99357 +165,2017-08-29,231.76,233.75,231.63,233.46,234.62357,-1.16357 +166,2017-08-30,233.44,234.87,233.24,234.57,234.93714,-0.36714 +167,2017-08-31,235.25,236.25,234.61,235.98,235.31929,0.66071 +168,2017-09-01,236.39,236.78,236.15,236.31,235.73500,0.57500 +169,2017-09-05,235.76,236.01,233.56,234.62,236.13429,-1.51429 +170,2017-09-06,235.36,235.78,234.78,235.42,236.56929,-1.14929 +171,2017-09-07,235.75,235.77,234.94,235.39,237.00286,-1.61286 +172,2017-09-08,235.07,235.62,234.85,235.11,237.36286,-2.25286 +173,2017-09-11,236.51,237.71,236.49,237.62,237.57643,0.04357 +174,2017-09-12,238.02,238.46,237.82,238.42,237.77000,0.65000 +175,2017-09-13,238.11,238.57,237.98,238.54,238.04929,0.49071 +176,2017-09-14,238.18,238.68,237.99,238.46,238.28214,0.17786 +177,2017-09-15,238.3,238.88,238.19,238.78,238.58286,0.19714 +178,2017-09-18,239.18,239.67,238.87,239.29,238.92429,0.36571 +179,2017-09-19,239.56,239.62,239.17,239.53,239.14714,0.38286 +180,2017-09-20,239.62,239.74,238.52,239.61,239.38714,0.22286 +181,2017-09-21,239.44,239.54,238.78,238.97,239.65571,-0.68571 +182,2017-09-22,238.65,239.2,238.62,239.02,239.95000,-0.93000 +183,2017-09-25,238.74,239.13,237.72,238.53,240.32429,-1.79429 +184,2017-09-26,239,239.27,238.41,238.68,240.64214,-1.96214 +185,2017-09-27,239.44,240.03,238.47,239.6,240.91429,-1.31429 +186,2017-09-28,239.3,239.98,239.2,239.89,241.22643,-1.33643 +187,2017-09-29,239.88,240.82,239.68,240.74,241.61214,-0.87214 +188,2017-10-02,240.98,241.78,240.8,241.78,241.96786,-0.18786 +189,2017-10-03,241.91,242.33,241.69,242.3,242.38000,-0.08000 +190,2017-10-04,242.13,242.85,242.01,242.58,242.80500,-0.22500 +191,2017-10-05,242.95,244.04,242.62,244.02,243.17643,0.84357 +192,2017-10-06,243.53,244.06,243.25,243.74,243.54429,0.19571 +193,2017-10-09,243.99,244.06,243.05,243.34,243.85571,-0.51571 +194,2017-10-10,243.96,244.4,243.37,243.98,244.18357,-0.20357 +195,2017-10-11,243.88,244.37,243.7,244.37,244.40571,-0.03571 +196,2017-10-12,244.02,244.41,243.74,244,244.63857,-0.63857 +197,2017-10-13,244.48,244.61,244,244.3,244.68214,-0.38214 +198,2017-10-16,244.55,244.84,244.18,244.63,244.76786,-0.13786 +199,2017-10-17,244.57,244.85,244.33,244.8,245.02500,-0.22500 +200,2017-10-18,245.21,245.26,244.83,245.04,245.17071,-0.13071 +201,2017-10-19,244.18,245.14,243.72,245.1,245.31643,-0.21643 +202,2017-10-20,245.98,246.4,245.09,246.37,245.51143,0.85857 +203,2017-10-23,246.72,246.75,245.33,245.41,245.69214,-0.28214 +204,2017-10-24,245.88,246.1,245.45,245.84,245.90786,-0.06786 +205,2017-10-25,245.48,245.6,243.39,244.63,246.13929,-1.50929 +206,2017-10-26,245.3,245.59,244.81,244.94,246.34071,-1.40071 +207,2017-10-27,245.76,247.12,244.95,246.94,246.56857,0.37143 +208,2017-10-30,246.33,246.84,245.7,246.02,246.64143,-0.62143 +209,2017-10-31,246.44,246.69,246.08,246.41,246.77714,-0.36714 +210,2017-11-01,247.26,247.63,246.33,246.73,246.89857,-0.16857 +211,2017-11-02,246.66,246.98,245.49,246.83,247.06500,-0.23500 +212,2017-11-03,247,247.7,246.55,247.65,247.12143,0.52857 +213,2017-11-06,247.51,248.18,247.43,248.04,247.18429,0.85571 +214,2017-11-07,248.15,248.52,247.31,247.86,247.26071,0.59929 +215,2017-11-08,247.67,248.39,247.37,248.29,247.33929,0.95071 +216,2017-11-09,246.96,247.6,245.65,247.39,247.51071,-0.12071 +217,2017-11-10,246.96,247.5,246.62,247.31,247.65929,-0.34929 +218,2017-11-13,246.56,247.79,246.52,247.54,247.79000,-0.25000 +219,2017-11-14,246.66,247.08,245.8,246.96,247.88429,-0.92429 +220,2017-11-15,245.9,246.48,244.95,245.73,248.17214,-2.44214 +221,2017-11-16,246.76,248.22,246.72,247.82,248.41857,-0.59857 +222,2017-11-17,247.43,247.79,247,247.09,248.88643,-1.79643 +223,2017-11-20,247.36,247.73,247.09,247.51,249.32214,-1.81214 +224,2017-11-21,248.35,249.33,247.47,249.13,249.72000,-0.59000 +225,2017-11-22,249.14,249.28,248.73,248.91,250.09429,-1.18429 +226,2017-11-24,249.45,249.6,249.29,249.48,250.55929,-1.07929 +227,2017-11-27,249.53,249.86,249.14,249.36,250.93214,-1.57214 +228,2017-11-28,249.87,251.92,249.77,251.89,251.45571,0.43429 +229,2017-11-29,252.03,252.62,251.25,251.74,252.00429,-0.26429 +230,2017-11-30,252.74,254.94,252.66,253.94,252.46929,1.47071 +231,2017-12-01,253.7,254.23,249.87,253.41,252.94786,0.46214 +232,2017-12-04,255.19,255.65,253.05,253.11,253.31071,-0.20071 +233,2017-12-05,253.38,254.07,252.05,252.2,253.83357,-1.63357 +234,2017-12-06,251.89,252.71,251.74,252.24,254.29214,-2.05214 +235,2017-12-07,252.1,253.38,251.96,253.04,254.69071,-1.65071 +236,2017-12-08,253.92,254.43,253,254.42,254.92214,-0.50214 +237,2017-12-11,254.49,255.25,254.39,255.19,255.22929,-0.03929 +238,2017-12-12,255.43,256.15,255.22,255.64,255.55357,0.08643 +239,2017-12-13,255.9,256.38,255.51,255.61,255.92071,-0.31071 +240,2017-12-14,255.93,256.06,254.51,254.56,256.29357,-1.73357 +241,2017-12-15,255.66,257.19,255.6,256.68,256.64714,0.03286 +242,2017-12-18,258.21,258.7,258.1,258.31,256.83286,1.47714 +243,2017-12-19,258.58,258.63,257.24,257.32,257.09500,0.22500 +244,2017-12-20,258.38,258.44,256.86,257.18,257.44214,-0.26214 +245,2017-12-21,257.87,258.49,257.44,257.71,257.86929,-0.15929 +246,2017-12-22,257.73,257.77,257.06,257.65,258.49643,-0.84643 +247,2017-12-26,257.2,257.58,257.04,257.34,259.00643,-1.66643 +248,2017-12-27,257.52,257.86,257.16,257.46,259.44286,-1.98286 +249,2017-12-28,258.01,258.04,257.59,257.99,259.92071,-1.93071 +250,2017-12-29,258.63,258.65,256.81,257.02,260.54643,-3.52643 +251,2018-01-02,257.96,258.9,257.54,258.86,261.25786,-2.39786 +252,2018-01-03,259.04,260.66,259.04,260.5,261.90857,-1.40857 +253,2018-01-04,261.2,262.12,260.57,261.59,262.76286,-1.17286 +254,2018-01-05,262.46,263.47,261.92,263.34,263.57643,-0.23643 +255,2018-01-08,263.23,263.99,262.91,263.82,264.43929,-0.61929 +256,2018-01-09,264.28,265.1,263.97,264.42,265.52857,-1.10857 +257,2018-01-10,263.59,264.3,262.86,264.01,266.52714,-2.51714 +258,2018-01-11,264.62,265.94,264.44,265.94,267.40143,-1.46143 +259,2018-01-12,266.23,267.86,265.9,267.67,268.20571,-0.53571 +260,2018-01-16,269.05,269.76,266,266.76,269.11071,-2.35071 +261,2018-01-17,267.78,269.72,266.76,269.3,269.85071,-0.55071 +262,2018-01-18,269.17,269.64,268.31,268.85,270.34714,-1.49714 +263,2018-01-19,269.48,270.07,268.85,270.07,270.88286,-0.81286 +264,2018-01-22,269.84,272.27,269.78,272.27,271.25857,1.01143 +265,2018-01-23,272.31,273.16,271.96,272.84,271.08857,1.75143 +266,2018-01-24,273.55,274.2,271.45,272.74,270.19143,2.54857 +267,2018-01-25,273.68,273.79,271.99,272.85,269.47071,3.37929 +268,2018-01-26,273.77,276.06,273.49,276.01,268.68143,7.32857 +269,2018-01-29,275.39,275.87,274.01,274.18,267.11429,7.06571 +270,2018-01-30,272.18,274.24,270.85,271.37,265.65643,5.71357 +271,2018-01-31,272.3,272.85,270.33,271.51,264.42214,7.08786 +272,2018-02-01,270.71,272.62,270.33,271.2,263.24000,7.96000 +273,2018-02-02,269.75,269.9,265.25,265.29,262.29714,2.99286 +274,2018-02-05,263.37,265.68,253.6,254.2,261.36500,-7.16500 +275,2018-02-06,250.35,259.76,249.16,259.21,260.56929,-1.35929 +276,2018-02-07,258.6,262.32,257.71,257.8,259.85643,-2.05643 +277,2018-02-08,258.13,258.28,248.09,248.13,259.04071,-10.91071 +278,2018-02-09,251.18,253.89,243.59,251.86,258.27143,-6.41143 +279,2018-02-12,254.1,257.16,252.02,255.56,258.22071,-2.66071 +280,2018-02-13,254.24,256.79,253.6,256.19,259.18143,-2.99143 +281,2018-02-14,254.56,260.04,254.55,259.65,259.54571,0.10429 +282,2018-02-15,261.56,262.97,258.86,262.96,259.81929,3.14071 +283,2018-02-16,262.28,265.17,262.23,263.04,260.51214,2.52786 +284,2018-02-20,262,263.58,260.53,261.39,261.03357,0.35643 +285,2018-02-21,261.87,264.59,259.99,260.09,261.50429,-1.41429 +286,2018-02-22,261.1,262.98,259.7,260.43,261.97786,-1.54786 +287,2018-02-23,261.77,264.58,261.25,264.58,262.19714,2.38286 +288,2018-02-26,265.76,267.76,265.11,267.65,262.27071,5.37929 +289,2018-02-27,267.86,268.63,264.24,264.31,262.66714,1.64286 +290,2018-02-28,265.51,266.01,261.29,261.63,263.15714,-1.52714 +291,2018-03-01,261.4,263.1,256.19,257.83,263.61643,-5.78643 +292,2018-03-02,256,259.77,255.05,259.16,263.95357,-4.79357 +293,2018-03-05,257.86,262.83,257.74,262.15,263.97357,-1.82357 +294,2018-03-06,263.22,263.31,261.18,262.82,263.79500,-0.97500 +295,2018-03-07,260.45,263.11,260.24,262.72,263.59857,-0.87857 +296,2018-03-08,263.46,264.13,262.37,263.99,263.62500,0.36500 +297,2018-03-09,265.53,268.59,265.19,268.59,263.88714,4.70286 +298,2018-03-12,268.9,269.59,267.83,268.25,263.58714,4.66286 +299,2018-03-13,269.52,270.07,265.85,266.52,262.68571,3.83429 +300,2018-03-14,267.57,267.77,264.54,265.15,262.22429,2.92571 +301,2018-03-15,265.71,266.41,264.31,264.86,261.45857,3.40143 +302,2018-03-16,265.44,266.3,265.09,265.15,260.54857,4.60143 +303,2018-03-19,264.32,265.34,259.75,261.56,259.53929,2.02071 +304,2018-03-20,261.99,262.7,261.26,262,258.16214,3.83786 +305,2018-03-21,261.96,264.25,261.27,261.5,257.13643,4.36357 +306,2018-03-22,259.06,259.99,254.66,254.96,256.40143,-1.44143 +307,2018-03-23,255.45,256.27,249.32,249.53,255.83071,-6.30071 +308,2018-03-26,253.48,256.67,250.84,256.36,254.83000,1.53000 +309,2018-03-27,257.38,257.96,250.29,252,254.17429,-2.17429 +310,2018-03-28,252.14,253.97,250.04,251.25,253.77429,-2.52429 +311,2018-03-29,252.5,256.5,251.26,254.46,253.31357,1.14643 +312,2018-04-02,253.88,254.44,246.26,248.97,253.47000,-4.50000 +313,2018-04-03,250.32,252.68,248.36,252.16,253.96071,-1.80071 +314,2018-04-04,248.27,255.63,248.13,254.86,254.11357,0.74643 +315,2018-04-05,256.78,257.84,255.59,256.87,254.77571,2.09429 +316,2018-04-06,254.72,256.36,249.48,251.14,255.50500,-4.36500 +317,2018-04-09,252.74,256.1,251.35,252.38,255.90143,-3.52143 +318,2018-04-10,255.54,257.26,254.3,256.4,256.53286,-0.13286 +319,2018-04-11,254.77,256.87,254.69,255.05,256.93357,-1.88357 +320,2018-04-12,256.5,258.18,256.31,257.15,256.89357,0.25643 +321,2018-04-13,258.58,258.71,255.29,256.4,256.75500,-0.35500 +322,2018-04-16,258.18,259.34,257.29,258.5,257.21071,1.28929 +323,2018-04-17,260.44,261.93,259.88,261.27,257.59500,3.67500 +324,2018-04-18,261.75,262.34,260.96,261.46,257.55071,3.90929 +325,2018-04-19,260.75,260.97,258.88,260.01,257.63500,2.37500 +326,2018-04-20,259.93,260.18,256.84,257.81,257.44643,0.36357 +327,2018-04-23,258.44,259.04,256.59,257.77,257.27143,0.49857 +328,2018-04-24,258.89,259.13,252.65,254.3,257.18143,-2.88143 +329,2018-04-25,254.23,255.41,252.24,254.93,256.95571,-2.02571 +330,2018-04-26,256.05,258.42,255.56,257.52,256.71643,0.80357 +331,2018-04-27,258.18,258.51,256.73,257.76,256.75857,1.00143 +332,2018-04-30,258.44,259.04,255.7,255.78,257.13214,-1.35214 +333,2018-05-01,255.16,256.35,253.46,256.23,257.56571,-1.33571 +334,2018-05-02,256.02,256.91,254.08,254.51,258.25643,-3.74643 +335,2018-05-03,253.6,254.66,250.5,253.95,258.77214,-4.82214 +336,2018-05-04,252.89,257.98,252.53,257.24,259.18143,-1.94143 +337,2018-05-07,258.08,259.17,257.32,258.11,259.55786,-1.44786 +338,2018-05-08,257.7,258.5,256.4,258.11,260.02857,-1.91857 +339,2018-05-09,258.84,260.95,258.27,260.6,260.60786,-0.00786 +340,2018-05-10,261.41,263.4,261.3,263.04,261.25786,1.78214 +341,2018-05-11,263.17,264.13,262.61,263.84,261.99929,1.84071 +342,2018-05-14,264.31,265.03,263.37,263.97,262.46714,1.50286 +343,2018-05-15,262.62,262.64,261.11,262.15,262.82786,-0.67786 +344,2018-05-16,262.19,263.75,262.16,263.25,262.97286,0.27714 +345,2018-05-17,262.96,264.21,262.18,263.03,263.18786,-0.15786 +346,2018-05-18,262.65,263.05,261.98,262.37,263.11286,-0.74286 +347,2018-05-21,264,264.93,262.39,264.34,263.16500,1.17500 +348,2018-05-22,264.91,265.2,263.25,263.61,263.29714,0.31286 +349,2018-05-23,262.22,264.36,262.04,264.33,263.57357,0.75643 +350,2018-05-24,263.9,264.2,261.84,263.79,263.93000,-0.14000 +351,2018-05-25,263.16,263.85,262.61,263.16,264.30000,-1.14000 +352,2018-05-29,261.39,262.22,258.92,260.14,264.77357,-4.63357 +353,2018-05-30,261.57,264.09,261.49,263.61,265.13214,-1.52214 +354,2018-05-31,263.16,263.49,261.33,261.99,265.56786,-3.57786 +355,2018-06-01,263.42,264.9,263.34,264.57,265.89071,-1.32071 +356,2018-06-04,265.47,266.1,265.2,265.82,266.30071,-0.48071 +357,2018-06-05,265.97,266.43,265.13,266.02,266.73071,-0.71071 +358,2018-06-06,266.68,268.36,266.01,268.24,267.33714,0.90286 +359,2018-06-07,268.77,269.09,267.22,268.21,267.62214,0.58786 +360,2018-06-08,267.71,269.06,267.53,269,268.05571,0.94429 +361,2018-06-11,269.25,270.15,269.12,269.36,268.18500,1.17500 +362,2018-06-12,269.82,270.11,269,269.71,268.25929,1.45071 +363,2018-06-13,269.97,270.25,268.63,268.85,268.06000,0.79000 +364,2018-06-14,269.8,270.11,268.88,269.53,267.74357,1.78643 +365,2018-06-15,268.67,269.55,267.45,269.18,267.27357,1.90643 +366,2018-06-18,267.59,268.77,267.07,268.63,266.85357,1.77643 +367,2018-06-19,266.14,267.84,265.69,267.6,266.43500,1.16500 +368,2018-06-20,268.35,268.78,267.69,268.06,266.03143,2.02857 +369,2018-06-21,268.05,268.07,265.83,266.38,265.62286,0.75714 +370,2018-06-22,267.76,267.88,266.62,266.86,265.31929,1.54071 +371,2018-06-25,265.6,265.77,261.38,263.23,265.20071,-1.97071 +372,2018-06-26,263.85,264.74,263.02,263.81,265.29357,-1.48357 +373,2018-06-27,264.45,266.01,261.46,261.63,265.52929,-3.89929 +374,2018-06-28,261.57,263.96,260.79,263.12,265.59071,-2.47071 +375,2018-06-29,264.32,265.81,263.37,263.5,265.94643,-2.44643 +376,2018-07-02,261.78,264.24,261.52,264.06,266.28286,-2.22286 +377,2018-07-03,265.05,265.15,262.67,263.13,266.86143,-3.73143 +378,2018-07-05,264.36,265.35,263.19,265.28,267.47714,-2.19714 +379,2018-07-06,265.31,267.93,264.89,267.52,268.28929,-0.76929 +380,2018-07-09,268.62,269.99,268.57,269.93,268.92143,1.00857 +381,2018-07-10,270.43,271.01,270.11,270.9,269.50429,1.39571 +382,2018-07-11,269.2,270.07,268.59,268.92,270.08286,-1.16286 +383,2018-07-12,270.3,271.42,269.64,271.36,270.82571,0.53429 +384,2018-07-13,271.16,271.9,270.67,271.57,271.58214,-0.01214 +385,2018-07-16,271.62,271.78,270.84,271.33,272.13143,-0.80143 +386,2018-07-17,270.48,272.85,270.43,272.43,272.37571,0.05429 +387,2018-07-18,272.51,273.12,272.03,273,272.44857,0.55143 +388,2018-07-19,272.27,272.69,271.45,271.97,272.75857,-0.78857 +389,2018-07-20,271.75,272.44,271.48,271.66,272.86214,-1.20214 +390,2018-07-23,271.44,272.39,271.06,272.16,273.05643,-0.89643 +391,2018-07-24,273.71,274.46,272.58,273.53,273.35214,0.17786 +392,2018-07-25,273.26,276.22,273.21,275.87,273.64143,2.22857 +393,2018-07-26,275.08,275.96,274.97,275.21,273.95500,1.25500 +394,2018-07-27,275.57,275.68,272.34,273.35,274.33357,-0.98357 +395,2018-07-30,273.44,273.61,271.35,271.92,274.70786,-2.78786 +396,2018-07-31,272.76,273.93,272.34,273.26,274.91357,-1.65357 +397,2018-08-01,273.49,274.04,272.1,272.81,274.94786,-2.13786 +398,2018-08-02,271.38,274.48,271.15,274.29,274.94000,-0.65000 +399,2018-08-03,274.43,275.52,274.23,275.47,274.83214,0.63786 +400,2018-08-06,275.51,276.82,275.08,276.48,275.01500,1.46500 +401,2018-08-07,277.21,277.81,277.06,277.39,275.37000,2.02000 +402,2018-08-08,277.21,277.71,276.77,277.27,275.67143,1.59857 +403,2018-08-09,277.34,277.77,276.74,276.9,276.05143,0.84857 +404,2018-08-10,275.32,275.91,274.26,275.04,276.31357,-1.27357 +405,2018-08-13,275.34,276.01,273.69,274.01,276.46500,-2.45500 +406,2018-08-14,274.81,276.02,274.38,275.76,276.66429,-0.90429 +407,2018-08-15,274.28,274.44,272.13,273.7,276.95571,-3.25571 +408,2018-08-16,275.27,276.87,275.23,275.91,277.26571,-1.35571 +409,2018-08-17,275.69,277.37,275.24,276.89,277.71000,-0.82000 +410,2018-08-20,277.38,277.77,276.89,277.48,278.20571,-0.72571 +411,2018-08-21,278.04,279.07,277.52,278.13,278.77500,-0.64500 +412,2018-08-22,277.68,278.54,277.39,277.96,279.18500,-1.22500 +413,2018-08-23,277.77,278.71,277.24,277.59,279.68786,-2.09786 +414,2018-08-24,278.23,279.42,278.17,279.27,279.97286,-0.70286 +415,2018-08-27,280.58,281.59,280.4,281.47,280.14857,1.32143 +416,2018-08-28,281.98,282.09,281.1,281.61,280.31714,1.29286 +417,2018-08-29,281.84,283.37,281.57,283.12,280.50500,2.61500 +418,2018-08-30,282.6,283,281.32,281.98,280.71000,1.27000 +419,2018-08-31,281.53,282.47,280.99,281.98,281.06000,0.92000 +420,2018-09-04,281.53,281.89,280.4,281.5,281.29357,0.20643 +421,2018-09-05,281.11,281.33,279.63,280.74,281.26286,-0.52286 +422,2018-09-06,280.86,281.19,278.77,279.9,281.33143,-1.43143 +423,2018-09-07,278.75,280.42,278.49,279.35,281.31357,-1.96357 +424,2018-09-10,280.46,280.75,279.62,279.84,281.54071,-1.70071 +425,2018-09-11,279.13,281.25,278.75,280.76,281.74929,-0.98929 +426,2018-09-12,280.77,281.49,279.96,280.83,281.92429,-1.09429 +427,2018-09-13,281.99,282.69,281.68,282.49,282.13500,0.35500 +428,2018-09-14,282.71,282.92,281.68,282.54,282.34500,0.19500 +429,2018-09-17,282.48,282.52,280.74,281.04,282.65071,-1.61071 +430,2018-09-18,281.28,283.22,281.25,282.57,282.92357,-0.35357 +431,2018-09-19,282.63,283.33,282.48,282.87,283.20143,-0.33143 +432,2018-09-20,284.25,285.51,282.88,285.16,283.46214,1.69786 +433,2018-09-21,285.97,286.1,284.72,284.9,283.61571,1.28429 +434,2018-09-24,284.27,284.42,283.32,283.95,283.60643,0.34357 +435,2018-09-25,284.45,284.57,283.43,283.69,283.59143,0.09857 +436,2018-09-26,283.85,285.14,282.38,282.84,283.46714,-0.62714 +437,2018-09-27,283.36,284.82,283.06,283.63,283.29214,0.33786 +438,2018-09-28,282.95,284.21,282.91,283.66,282.31929,1.34071 +439,2018-10-01,285.02,285.82,283.91,284.65,280.93786,3.71214 +440,2018-10-02,284.48,285.26,284.07,284.48,279.88786,4.59214 +441,2018-10-03,285.63,286.09,284.25,284.64,278.74857,5.89143 +442,2018-10-04,284.11,284.17,280.68,282.41,278.08786,4.32214 +443,2018-10-05,282.66,283.22,279.27,280.83,277.37429,3.45571 +444,2018-10-08,280.08,281.22,278.57,280.83,276.37643,4.45357 +445,2018-10-09,280.41,281.85,279.81,280.42,275.29714,5.12286 +446,2018-10-10,279.87,279.94,271.13,271.54,274.14357,-2.60357 +447,2018-10-11,270.35,272.13,263.8,265.56,272.88143,-7.32143 +448,2018-10-12,270.05,270.36,265.76,269.25,271.20071,-1.95071 +449,2018-10-15,268.86,270.31,267.64,267.74,269.96429,-2.22429 +450,2018-10-16,269.88,274,269.37,273.59,268.39714,5.19286 +451,2018-10-17,273.63,274.32,270.82,273.64,266.75643,6.88357 +452,2018-10-18,272.62,273.27,268.29,269.69,266.02286,3.66714 +453,2018-10-19,270.4,272.52,268.78,269.54,265.91571,3.62429 +454,2018-10-22,270.27,270.63,267.75,268.33,265.74571,2.58429 +455,2018-10-23,264.37,268.2,262.09,266.97,265.57071,1.39929 +456,2018-10-24,266.69,267.11,258.27,258.88,265.08214,-6.20214 +457,2018-10-25,260.89,265.21,259.77,263.52,264.71071,-1.19071 +458,2018-10-26,259.46,264.42,255.92,258.89,265.03214,-6.14214 +459,2018-10-29,262.27,263.69,253.54,257.45,265.32857,-7.87857 +460,2018-10-30,257.27,261.61,256.73,261.27,265.52071,-4.25071 +461,2018-10-31,264.08,266.6,263.56,264.06,265.44786,-1.38786 +462,2018-11-01,265.01,267.08,263.81,266.87,265.91714,0.95286 +463,2018-11-02,268.08,268.55,263.04,265.29,265.92571,-0.63571 +464,2018-11-05,265.82,267.36,264.76,266.75,266.46143,0.28857 +465,2018-11-06,266.68,268.62,266.62,268.44,267.14929,1.29071 +466,2018-11-07,270.82,274.27,270.35,274.19,267.24214,6.94786 +467,2018-11-08,273.31,274.39,272.44,273.69,266.78857,6.90143 +468,2018-11-09,272.25,272.46,269.47,271.02,266.19643,4.82357 +469,2018-11-12,270.46,270.72,265.39,265.95,265.59429,0.35571 +470,2018-11-13,266.46,268.64,264.66,265.45,265.18357,0.26643 +471,2018-11-14,267.5,267.94,261.93,263.64,264.71500,-1.07500 +472,2018-11-15,262.25,266.9,260.53,266.39,264.26643,2.12357 +473,2018-11-16,265.19,268.08,264.62,267.08,263.81214,3.26786 +474,2018-11-19,266.42,266.74,261.56,262.57,263.66500,-1.09500 +475,2018-11-20,258.92,260.52,256.76,257.71,264.13429,-6.42429 +476,2018-11-21,259.4,260.66,258.58,258.58,264.00857,-5.42857 +477,2018-11-23,256.79,258.39,256.68,256.86,263.98357,-7.12357 +478,2018-11-26,259.33,261.25,258.9,261,263.32500,-2.32500 +479,2018-11-27,259.87,261.88,259.21,261.88,262.65214,-0.77214 +480,2018-11-28,263.05,267.91,261.81,267.91,262.30571,5.60429 +481,2018-11-29,267.06,268.86,265.82,267.33,262.39857,4.93143 +482,2018-11-30,267.16,269.57,266.81,268.96,262.42357,6.53643 +483,2018-12-03,273.47,273.59,270.77,272.52,262.23000,10.29000 +484,2018-12-04,271.61,272.08,263.35,263.69,261.38429,2.30571 +485,2018-12-06,259.46,263.41,256.07,263.29,260.45643,2.83357 +486,2018-12-07,262.92,264.63,256.25,257.17,258.83143,-1.66143 +487,2018-12-10,256.98,258.72,252.34,257.66,256.96286,0.69714 +488,2018-12-11,261.16,261.37,256.11,257.72,254.62500,3.09500 +489,2018-12-12,260.98,262.47,258.93,259.01,251.58714,7.42286 +490,2018-12-13,260.05,260.99,257.71,258.93,250.01000,8.92000 +491,2018-12-14,256.58,257.62,253.54,254.15,248.59357,5.55643 +492,2018-12-17,253.1,254.32,247.37,249.16,247.59214,1.56786 +493,2018-12-18,250.95,251.69,247.13,248.89,246.70786,2.18214 +494,2018-12-19,248.97,253.1,243.3,245.16,, +495,2018-12-20,243.79,245.51,238.71,241.17,, +496,2018-12-21,242.16,245.07,235.52,236.23,, +497,2018-12-24,234.6,236.36,229.92,229.99,, +498,2018-12-26,231.59,241.61,229.42,241.61,, +499,2018-12-27,238.06,243.68,234.52,243.46,, +500,2018-12-28,244.94,246.73,241.87,243.15,, +501,2018-12-31,244.92,245.54,242.87,245.28,, diff --git a/tests/indicators/Tests.Indicators.csproj b/tests/indicators/Tests.Indicators.csproj index f86a00a52..db6cce7ed 100644 --- a/tests/indicators/Tests.Indicators.csproj +++ b/tests/indicators/Tests.Indicators.csproj @@ -31,6 +31,9 @@ + + Always + Always diff --git a/tests/performance/Perf.Indicators.cs b/tests/performance/Perf.Indicators.cs index 452c14a97..8a27854a3 100644 --- a/tests/performance/Perf.Indicators.cs +++ b/tests/performance/Perf.Indicators.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using BenchmarkDotNet.Attributes; using Internal.Tests; using Skender.Stock.Indicators; @@ -153,6 +153,12 @@ public object GetDoubleEma() return h.GetDoubleEma(14); } + [Benchmark] + public object GetDpo() + { + return h.GetDpo(14); + } + [Benchmark] public object GetElderRay() {