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

Constructor for custom datetime doesn't work #497

Open
201508876PMH opened this issue Jul 24, 2024 · 2 comments
Open

Constructor for custom datetime doesn't work #497

201508876PMH opened this issue Jul 24, 2024 · 2 comments

Comments

@201508876PMH
Copy link

Constructor for timezone can't be overriden. It always stays america

@grzesir
Copy link
Contributor

grzesir commented Jul 25, 2024 via email

@201508876PMH
Copy link
Author

201508876PMH commented Jul 26, 2024

The docs says the data class takes localize_timezone , but is in fact timezone. When then trying to define timezone to anything as UTC, the data object is always still America :)

def load_forex_data():
    base_asset = Asset(symbol="EUR", asset_type='forex')
    quote_asset = Asset(symbol="USD", asset_type='forex')

    df = pd.read_csv('ap-lumibot\data\EURUSD_Candlestick_5_M.csv')
    data = Data(
        asset=base_asset,
        quote=quote_asset,
        df=df,
        timestep="minute",
        timezone='UTC'
    )

    pandas_data = {
        'asset' : data
    }

    return pandas_data, pandas_data['asset'].datetime_start, pandas_data['asset'].datetime_end

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

No branches or pull requests

2 participants