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)
| 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 | """ |