Skip to content

Commit

Permalink
added few docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaron committed Feb 29, 2024
1 parent eba654e commit 53f14d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions roboquant/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ def price(self, price_type: str = "DEFAULT") -> float:
case _:
return self.ohlcv[3]

@property
def close(self):
return self.ohlcv[3]

def volume(self, volume_type: str = "DEFAULT") -> float:
return self.ohlcv[4]

Expand Down
4 changes: 4 additions & 0 deletions roboquant/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,8 @@ def is_sell(self):

@property
def remaining(self):
"""Return the remaining to be filled.
In case of a sell order, the remaining can be a negative number.
"""
return self.size - self.fill
4 changes: 3 additions & 1 deletion roboquant/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class SignalType(Flag):

@dataclass(slots=True, frozen=True)
class Signal:
"""Signal that a strategy can create"""
"""Signal that a strategy can create.
It contains both a rating between -1.0 and 1.0 and a type.
"""

rating: float
type: SignalType = SignalType.BOTH
Expand Down

0 comments on commit 53f14d2

Please sign in to comment.