Skip to content

Commit f971d9b

Browse files
authored
Merge pull request #471 from williamhobbs/main
update herbielatest to use periods
2 parents 7803a67 + 81c68e3 commit f971d9b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/herbie/latest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def HerbieLatest(
2929
but I also know AWS gets the data pretty quick. So, check AWS
3030
first, then check NOMADS (because if you make too many downloads
3131
from NOMADS your IP address will get blocked.)
32+
periods : int
33+
The number of periods (initialization datetimes) to search through.
3234
**kwargs
3335
Any other input you want passed to the Herbie class.
3436
"""
@@ -40,7 +42,7 @@ def HerbieLatest(
4042
# Create a list of recent dates to try
4143
dates = pd.date_range(
4244
pd.Timestamp.utcnow().floor(freq).tz_localize(None),
43-
periods=4,
45+
periods=periods,
4446
freq=f"-{freq}",
4547
)
4648

0 commit comments

Comments
 (0)