Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves resampling issues due to timezone differences. #467

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sohamsjain
Copy link

Datafeed sourced from IB API receives timezone info from contractdetails.
This tz info was not passed to num2date() method in lines 275 and 276.
This results in an offset in the point value returned by self._gettmpoint(tm).
This offset distorts the resampling and produces bars at irregular intervals.
Above modifications takes care of the same.

Note: Modified code was tested on Minute 1 timeframe resampled to 20, 25 & 75 minutes using ibdata and data form local csv file.

Datafeed sourced from IB API receives timezone info from contractdetails.
This tz info was not passed to num2date() method in lines 275 and 276.
This results in an offset in the point value returned by self._gettmpoint(tm).
This offset distorts the resampling and produces bars at irregular intervals.
Above modifications takes care of the same.

Note: Modified code was tested on `Minute 1` timeframe resampled to 20, 25 & 75 minutes using ibdata and data form local csv file.
@datatalking
Copy link

@sohamsjain This is the most recent PR of this repo so I thought to reach out. I would like to contribute to the repo but there is multiple repos and I'm not sure what is maintained. So which of those are active, the community has links to herbal remedies, yoga, and quickbooks spam, there seems to be no central 'we are doing this' place?

  1. The community - https://community.backtrader.com/topic/2553/backtrader-s-future/60?page=3
  2. Two github repos https://github.com/mementum/backtrader and https://github.com/backtrader2/backtrader
  3. The blog https://www.backtrader.com/docu/installation/
  4. Backtrader2 repo links to two different issue repos... https://github.com/backtrader2
  5. What is active or where can I contribute? I'm wanting to integrate my existing stack of python, 'pandas-dataframe', 'old-quanopian', 'mstables', 'investpy' and my existing dataset but I'm not sure where to start. The documentation is lacking, and I'm willing to help update it for python newbs like myself. Having spent a dozen years in finance the money side of this makes sense the python is the fun challenge

@jjphung
Copy link

jjphung commented Mar 24, 2023

@datatalking Unfortunately, even backtrader2 doesn't look like it's actively maintained. So far, I have found 2 forks that seem to be actively maintained:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants