DaveSkender / Stock.Indicators

Stock Indicators for .NET is a C# NuGet package that transforms raw equity, commodity, forex, or cryptocurrency financial market price quotes into technical indicators and trading insights. You'll need this essential data in the investment tools that you're building for algorithmic trading, technical analysis, machine learning, or visual charting.
https://dotnet.StockIndicators.dev
Apache License 2.0
978 stars 245 forks source link

Does `quotes.Aggregate(PeriodSize.Week)` use a fixed calendar week? #1184

Open DaveSkender opened 7 months ago

DaveSkender commented 7 months ago

The quotes.Aggregate(PeriodSize.Week) utility likely uses a rolling 7-day week instead of a fixed week with a specific day (e.g. Saturday) as the end -- which may be more preferred in most use cases.

Originally posted by @DaveSkender in https://github.com/DaveSkender/Stock.Indicators/issues/1183#issuecomment-2030205582

DaveSkender commented 7 months ago

The fix here is likely to make the non-TimeSpan variant of this method only use fixed calendar windows, like we do in our regular week block code for Pivot Points.

... switch {
  PeriodSize.Month => d.Month,
  PeriodSize.Week => EnglishCalendar.GetWeekOfYear(d, EnglishCalendarWeekRule, EnglishFirstDayOfWeek),
  ...

to do

hmuhdkamran commented 7 months ago

Great, hoping it may get the good result, I am waiting for new rollout, when you fix the issue. I am also planning, to use dll in rust and go, and creat a library for rust and go users as well.

DaveSkender commented 7 months ago

I am also planning to use dll in rust and go, and creat a library for rust and go users as well.

If you get started with Go and/or Rust, think you can commit to it long term, and want to add it to our collection with some co-branding on go/rust.stockindicators.dev, let me know. I’ll likely be moving these repos out of my personal account over to the @facioquo Org in the next months, and can start adding contributions there.

hmuhdkamran commented 7 months ago

Let's have a plan for it, and by proper timeline, lets start on it. I will make spare time for it and some weekends too, and let it start for the finish.

DaveSkender commented 7 months ago

I am also planning to use dll in rust and go, and creat a library for rust and go users as well.

@hmuhdkamran, let's continue this discussion here: