Skip to content

calculation of Buy & Hold Return #327

Closed
@zillionare

Description

@zillionare

this is how Buy & Hold Return is calculated:

        c = data.Close.values
        s.loc['Buy & Hold Return [%]'] = (c[-1] - c[0]) / c[0] * 100  # long-only return

so it's calced use day one and the day last.

Expected Behavior

Buy & Hold Return is used for compare with strategy gain. Therefore, I guess they should started at same time, since the strategy get enough data to work on.

Take cross ma strategy example, use 5 days for short line and 10 days for long line, the strategy can only works from 10th trade day. It's better to make comparision since this day

  • Backtesting version: 0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Hacktoberfesthttps://hacktoberfest.digitalocean.combugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions