MCPcopy Index your code
hub / github.com/quantopian/zipline / sid

Method sid

zipline/algorithm.py:1115–1133  ·  view source on GitHub ↗

Lookup an Asset by its unique asset identifier. Parameters ---------- sid : int The unique integer that identifies an asset. Returns ------- asset : zipline.assets.Asset The asset with the given ``sid``. Raises

(self, sid)

Source from the content-addressed store, hash-verified

1113
1114 @api_method
1115 def sid(self, sid):
1116 """Lookup an Asset by its unique asset identifier.
1117
1118 Parameters
1119 ----------
1120 sid : int
1121 The unique integer that identifies an asset.
1122
1123 Returns
1124 -------
1125 asset : zipline.assets.Asset
1126 The asset with the given ``sid``.
1127
1128 Raises
1129 ------
1130 SidsNotFound
1131 When a requested ``sid`` does not map to any asset.
1132 """
1133 return self.asset_finder.retrieve_asset(sid)
1134
1135 @api_method
1136 @preprocess(symbol=ensure_upper_case)

Callers

nothing calls this directly

Calls 1

retrieve_assetMethod · 0.80

Tested by

no test coverage detected