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

Add backtest_with_dates #413

Closed
wants to merge 3 commits into from

Conversation

btagliani
Copy link
Contributor

No description provided.

@saleh-mir
Copy link
Member

I see that this is still a draft and not manageable. I have a similar function myself that I wrote a few weeks ago.

# get candles from the DB
    candles = get_candles(
        exchange_name, symbol, timeframe, start_date_str, finish_date_str
    )

    routes = [
        {'exchange': exchange_name, 'strategy': strategy_name, 'symbol': symbol, 'timeframe': timeframe}
    ]
    candles = {
        jh.key(exchange_name, symbol): {
            'exchange': exchange_name,
            'symbol': symbol,
            'candles': candles,
        },
    }

    # Execute backtest
    result = backtest(
        config,
        routes,
        [],
        candles,
        generate_charts=True,
        generate_quantstats=True,
        generate_equity_curve=True,
        generate_csv=True,
    )

However, the problem is that this would work only on one exchange. With your code, I think the problem is that it is not a pure function, which was my intention for the research module's backtest function.

Copy link

stale bot commented Jan 11, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity. label Jan 11, 2024
@stale stale bot removed the stale No recent activity. label Jan 19, 2024
Copy link

stale bot commented Mar 19, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity. label Mar 19, 2024
@stale stale bot closed this Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants