Skip to content

Erroneous float calculations. #61

@krsna-sentieo

Description

@krsna-sentieo

🐛 Bug Description

When an expression is being evaluated, I think the series is changed into np.float32 and when returning back its being changed back to np.float64. Calculation results are in fact erroneous.

To Reproduce

d = get_quote_data([ticker], fields=['$close', '$volume', 'Mul($close, $volume)'], start_time='2020-10-23', end_time='2020-10-30')
image

image

Expected Behavior

The actual value should be 3989893260.0

Screenshot

Environment

Note: One could run python scripts/collect_info.py under the qlib directory to get the following information.

  • Qlib version:
  • Python version:
  • OS (Windows, Linux, MacOS):
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions