microsoft / microsoft/MarS

Inconsistent Handling of Time Zones in Market Simulation

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.8k
Forks
193
PR merge metrics
No merged PRs in 30d

Description

Description: The current documentation and examples for MarS do not explicitly address the handling of time zones in market simulations. This lack of clarity can lead to inconsistencies and incorrect results, especially when dealing with data from different exchanges or when simulating events across multiple time zones.

To Reproduce:

Run a simulation that involves data from exchanges located in different time zones (e.g., New York and Tokyo).
Observe the timestamps of events, orders, and transactions.
Compare the simulated market behavior with the expected behavior, considering the time zone differences.

Expected behavior:

MarS should provide clear guidance on how to specify and handle time zones for market data and simulation events.
The simulation engine should correctly account for time zone differences when processing events and updating the market state.
Ideally, MarS should support time zone-aware data structures and functions to prevent ambiguity and errors.

Possible Solutions/Improvements:

Add a dedicated section to the documentation explaining how to work with time zones in MarS.
Introduce parameters or configuration options to specify the time zone for market data and simulations.
Consider using a time zone-aware library (e.g., pytz in Python) to handle time zone conversions and calculations.
Provide examples demonstrating how to simulate markets with data from different time zones.

Additional context:

This issue is crucial for ensuring the accuracy and reliability of market simulations, especially when dealing with global markets. Inconsistent time zone handling can lead to incorrect order matching, incorrect calculation of market metrics, and ultimately, flawed simulation results. This issue also impacts reproducibility and comparability of results across different simulations.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the documentation and examples for market data, then trace how simulation events, orders, and transactions represent timestamps. Clarify whether the intended outcome is documentation only or also timezone-aware engine support, and define completion around consistent behavior for New York and Tokyo data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, fintech-quant
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.