MCPcopy
hub / github.com/microsoft/qlib / get_volume

Method get_volume

qlib/backtest/exchange.py:484–492  ·  view source on GitHub ↗

get the total deal volume of stock with `stock_id` between the time interval [start_time, end_time)

(
        self,
        stock_id: str,
        start_time: pd.Timestamp,
        end_time: pd.Timestamp,
        method: Optional[str] = "sum",
    )

Source from the content-addressed store, hash-verified

482 return self.quote.get_data(stock_id, start_time, end_time, field="$close", method=method)
483
484 def get_volume(
485 self,
486 stock_id: str,
487 start_time: pd.Timestamp,
488 end_time: pd.Timestamp,
489 method: Optional[str] = "sum",
490 ) -> Union[None, int, float, bool, IndexData]:
491 """get the total deal volume of stock with `stock_id` between the time interval [start_time, end_time)"""
492 return self.quote.get_data(stock_id, start_time, end_time, field="$volume", method=method)
493
494 def get_deal_price(
495 self,

Callers 4

test_simulator_stop_twapFunction · 0.45
test_simulator_stop_twapFunction · 0.45
_get_base_vol_priMethod · 0.45

Calls 1

get_dataMethod · 0.45

Tested by 2

test_simulator_stop_twapFunction · 0.36
test_simulator_stop_twapFunction · 0.36