forked from mhallsmoore/qstrader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added suggested_quantity keyword argument to SignalEvent in order to …
…transmit quantity information to PositionSizer. Added NaivePositionSizer to 'blindly' accept suggested quantities from SignalEvents.
- Loading branch information
1 parent
eba6789
commit 9834aae
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from .base import AbstractPositionSizer | ||
|
||
|
||
class NaivePositionSizer(AbstractPositionSizer): | ||
def __init__(self, default_quantity=100): | ||
self.default_quantity = default_quantity | ||
|
||
def size_order(self, portfolio, initial_order): | ||
""" | ||
This NaivePositionSizer object follows all | ||
suggestions from the initial order without | ||
modification. Useful for testing simpler | ||
strategies that do not reside in a larger | ||
risk-managed portfolio. | ||
""" | ||
return initial_order |