@@ -109,20 +109,20 @@ def future_chain(root_symbol, as_of_date=None): |
109 | 109 | def future_symbol(symbol): |
110 | 110 | """Lookup a futures contract with a given symbol. |
111 | 111 |
|
112 | | - Parameters |
113 | | - ---------- |
114 | | - symbol : str |
115 | | - The symbol of the desired contract. |
| 112 | + Parameters |
| 113 | + ---------- |
| 114 | + symbol : str |
| 115 | + The symbol of the desired contract. |
116 | 116 |
|
117 | | - Returns |
118 | | - ------- |
119 | | - future : Future |
120 | | - The future that trades with the name ``symbol``. |
| 117 | + Returns |
| 118 | + ------- |
| 119 | + future : Future |
| 120 | + The future that trades with the name ``symbol``. |
121 | 121 |
|
122 | | - Raises |
123 | | - ------ |
124 | | - SymbolNotFound |
125 | | - Raised when no contract named 'symbol' is found. |
| 122 | + Raises |
| 123 | + ------ |
| 124 | + SymbolNotFound |
| 125 | + Raised when no contract named 'symbol' is found. |
126 | 126 | """ |
127 | 127 |
|
128 | 128 | def get_datetime(tz=None): |
@@ -208,6 +208,10 @@ def order(asset, amount, limit_price=None, stop_price=None, style=None): |
208 | 208 | The amount of shares to order. If ``amount`` is positive, this is |
209 | 209 | the number of shares to buy or cover. If ``amount`` is negative, |
210 | 210 | this is the number of shares to sell or short. |
| 211 | + limit_price : float, optional |
| 212 | + The limit price for the order. |
| 213 | + stop_price : float, optional |
| 214 | + The stop price for the order. |
211 | 215 | style : ExecutionStyle, optional |
212 | 216 | The execution style for the order. |
213 | 217 |
|
@@ -216,6 +220,16 @@ def order(asset, amount, limit_price=None, stop_price=None, style=None): |
216 | 220 | order_id : str |
217 | 221 | The unique identifier for this order. |
218 | 222 |
|
| 223 | + Notes |
| 224 | + ----- |
| 225 | + The ``limit_price`` and ``stop_price`` arguments provide shorthands for |
| 226 | + passing common execution styles. Passing ``limit_price=N`` is |
| 227 | + equivalent to ``style=LimitOrder(N)``. Similarly, passing |
| 228 | + ``stop_price=M`` is equivalent to ``style=StopOrder(M)``, and passing |
| 229 | + ``limit_price=N`` and ``stop_price=M`` is equivalent to |
| 230 | + ``style=StopLimitOrder(N, M)``. It is an error to pass both a ``style`` |
| 231 | + and ``limit_price`` or ``stop_price``. |
| 232 | +
|
219 | 233 | See Also |
220 | 234 | -------- |
221 | 235 | :class:`zipline.finance.execution.ExecutionStyle` |
@@ -234,6 +248,10 @@ def order_percent(asset, percent, limit_price=None, stop_price=None, style=None) |
234 | 248 | percent : float |
235 | 249 | The percentage of the porfolio value to allocate to ``asset``. |
236 | 250 | This is specified as a decimal, for example: 0.50 means 50%. |
| 251 | + limit_price : float, optional |
| 252 | + The limit price for the order. |
| 253 | + stop_price : float, optional |
| 254 | + The stop price for the order. |
237 | 255 | style : ExecutionStyle |
238 | 256 | The execution style for the order. |
239 | 257 |
|
@@ -242,6 +260,11 @@ def order_percent(asset, percent, limit_price=None, stop_price=None, style=None) |
242 | 260 | order_id : str |
243 | 261 | The unique identifier for this order. |
244 | 262 |
|
| 263 | + Notes |
| 264 | + ----- |
| 265 | + See :func:`zipline.api.order` for more information about |
| 266 | + ``limit_price``, ``stop_price``, and ``style`` |
| 267 | +
|
245 | 268 | See Also |
246 | 269 | -------- |
247 | 270 | :class:`zipline.finance.execution.ExecutionStyle` |
@@ -262,6 +285,10 @@ def order_target(asset, target, limit_price=None, stop_price=None, style=None): |
262 | 285 | The asset that this order is for. |
263 | 286 | target : int |
264 | 287 | The desired number of shares of ``asset``. |
| 288 | + limit_price : float, optional |
| 289 | + The limit price for the order. |
| 290 | + stop_price : float, optional |
| 291 | + The stop price for the order. |
265 | 292 | style : ExecutionStyle |
266 | 293 | The execution style for the order. |
267 | 294 |
|
@@ -285,6 +312,9 @@ def order_target(asset, target, limit_price=None, stop_price=None, style=None): |
285 | 312 | call to ``order_target`` will not have been filled when the second |
286 | 313 | ``order_target`` call is made. |
287 | 314 |
|
| 315 | + See :func:`zipline.api.order` for more information about |
| 316 | + ``limit_price``, ``stop_price``, and ``style`` |
| 317 | +
|
288 | 318 | See Also |
289 | 319 | -------- |
290 | 320 | :class:`zipline.finance.execution.ExecutionStyle` |
@@ -308,6 +338,10 @@ def order_target_percent(asset, target, limit_price=None, stop_price=None, style |
308 | 338 | The desired percentage of the porfolio value to allocate to |
309 | 339 | ``asset``. This is specified as a decimal, for example: |
310 | 340 | 0.50 means 50%. |
| 341 | + limit_price : float, optional |
| 342 | + The limit price for the order. |
| 343 | + stop_price : float, optional |
| 344 | + The stop price for the order. |
311 | 345 | style : ExecutionStyle |
312 | 346 | The execution style for the order. |
313 | 347 |
|
@@ -330,6 +364,9 @@ def order_target_percent(asset, target, limit_price=None, stop_price=None, style |
330 | 364 | because the first call to ``order_target_percent`` will not have been |
331 | 365 | filled when the second ``order_target_percent`` call is made. |
332 | 366 |
|
| 367 | + See :func:`zipline.api.order` for more information about |
| 368 | + ``limit_price``, ``stop_price``, and ``style`` |
| 369 | +
|
333 | 370 | See Also |
334 | 371 | -------- |
335 | 372 | :class:`zipline.finance.execution.ExecutionStyle` |
@@ -353,6 +390,10 @@ def order_target_value(asset, target, limit_price=None, stop_price=None, style=N |
353 | 390 | The asset that this order is for. |
354 | 391 | target : float |
355 | 392 | The desired total value of ``asset``. |
| 393 | + limit_price : float, optional |
| 394 | + The limit price for the order. |
| 395 | + stop_price : float, optional |
| 396 | + The stop price for the order. |
356 | 397 | style : ExecutionStyle |
357 | 398 | The execution style for the order. |
358 | 399 |
|
@@ -375,6 +416,9 @@ def order_target_value(asset, target, limit_price=None, stop_price=None, style=N |
375 | 416 | call to ``order_target_value`` will not have been filled when the |
376 | 417 | second ``order_target_value`` call is made. |
377 | 418 |
|
| 419 | + See :func:`zipline.api.order` for more information about |
| 420 | + ``limit_price``, ``stop_price``, and ``style`` |
| 421 | +
|
378 | 422 | See Also |
379 | 423 | -------- |
380 | 424 | :class:`zipline.finance.execution.ExecutionStyle` |
@@ -399,6 +443,10 @@ def order_value(asset, value, limit_price=None, stop_price=None, style=None): |
399 | 443 |
|
400 | 444 | value > 0 :: Buy/Cover |
401 | 445 | value < 0 :: Sell/Short |
| 446 | + limit_price : float, optional |
| 447 | + The limit price for the order. |
| 448 | + stop_price : float, optional |
| 449 | + The stop price for the order. |
402 | 450 | style : ExecutionStyle |
403 | 451 | The execution style for the order. |
404 | 452 |
|
@@ -407,6 +455,11 @@ def order_value(asset, value, limit_price=None, stop_price=None, style=None): |
407 | 455 | order_id : str |
408 | 456 | The unique identifier for this order. |
409 | 457 |
|
| 458 | + Notes |
| 459 | + ----- |
| 460 | + See :func:`zipline.api.order` for more information about |
| 461 | + ``limit_price``, ``stop_price``, and ``style`` |
| 462 | +
|
410 | 463 | See Also |
411 | 464 | -------- |
412 | 465 | :class:`zipline.finance.execution.ExecutionStyle` |
|