Skip to content

Commit

Permalink
update example 2 of calendar consolidators
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisSzeto committed Nov 1, 2024
1 parent 3a21b48 commit fd69600
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ <h4>Example 2: Consolidate data in daily <code>QuoteBar</code> objects that star
# Forex market opens at 5pm EST.
start = dt.replace(hour=0, minute=0, second=0, microsecond=0)
if dt.hour &lt; 17:
start -= timedelta(7)
start -= timedelta(hours=7)
else:
start += timedelta(17)
start += timedelta(hours=17)
# Ends at 5pm EST next day.
return CalendarInfo(start, timedelta(1))

Expand Down

0 comments on commit fd69600

Please sign in to comment.