MCPcopy
hub / github.com/quantopian/zipline / future_symbol

Method future_symbol

zipline/algorithm.py:1137–1155  ·  view source on GitHub ↗

Lookup a futures contract with a given symbol. Parameters ---------- symbol : str The symbol of the desired contract. Returns ------- future : zipline.assets.Future The future that trades with the name ``symbol``. Rai

(self, symbol)

Source from the content-addressed store, hash-verified

1135 @api_method
1136 @preprocess(symbol=ensure_upper_case)
1137 def future_symbol(self, symbol):
1138 """Lookup a futures contract with a given symbol.
1139
1140 Parameters
1141 ----------
1142 symbol : str
1143 The symbol of the desired contract.
1144
1145 Returns
1146 -------
1147 future : zipline.assets.Future
1148 The future that trades with the name ``symbol``.
1149
1150 Raises
1151 ------
1152 SymbolNotFound
1153 Raised when no contract named 'symbol' is found.
1154 """
1155 return self.asset_finder.lookup_future_symbol(symbol)
1156
1157 def _calculate_order_value_amount(self, asset, value):
1158 """

Callers 1

test_future_symbolMethod · 0.80

Calls 1

lookup_future_symbolMethod · 0.80

Tested by 1

test_future_symbolMethod · 0.64