Skip to content

Commit

Permalink
Added more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed May 25, 2021
1 parent 13f0182 commit 0b557f9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions findatapy_examples/s3_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@

print(df)

folder = 's3://type_your_s3_bucket here'
folder = 's3://raazi-plato'

# Save to disk in a format friendly for reading later (ie. s3://bla_bla_bla/backtest.fx.tick.dukascopy.NYC.EURUSD.parquet)
# Save to disk in a format friendly for reading later (ie. s3://bla_bla_bla/backtest.fx.dukascopy.tick.NYC.EURUSD.parquet)
# Here it will automatically generate the filename from the folder we gave
# and the MarketDataRequest we made (altenatively, we could have just given the filename directly)
IOEngine().write_time_series_cache_to_disk(folder, df, engine='parquet', md_request=md_request)
Expand All @@ -79,4 +79,9 @@

df = market.fetch_market(md_request)

print(df)
print(df)

# Or read the parquet directly
df2 = IOEngine().read_parquet(folder + "/backtest.fx.dukascopy.tick.NYC.EURUSD.parquet")

print(df2)

0 comments on commit 0b557f9

Please sign in to comment.