Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

docs: fix simple typo, becuase -> because #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyalgotrade/broker/fillstrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def getVolumeUsed(self):
def onOrderFilled(self, broker_, order):
# Update the volume left.
if self.__volumeLimit is not None:
# We round the volume left here becuase it was not rounded when it was initialized.
# We round the volume left here because it was not rounded when it was initialized.
volumeLeft = order.getInstrumentTraits().roundQuantity(self.__volumeLeft[order.getInstrument()])
fillQuantity = order.getExecutionInfo().getQuantity()
assert volumeLeft >= fillQuantity, \
Expand Down
2 changes: 1 addition & 1 deletion pyalgotrade/stratanalyzer/sharpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def sharpe_ratio_2(returns, riskFreeRate, firstDateTime, lastDateTime, annualize
volatility = stats.stddev(returns, 1)

if volatility != 0:
# We use 365 instead of 252 becuase we wan't the diff from 1/1/xxxx to 12/31/xxxx to be 1 year.
# We use 365 instead of 252 because we wan't the diff from 1/1/xxxx to 12/31/xxxx to be 1 year.
yearsTraded = days_traded(firstDateTime, lastDateTime) / 365.0

riskFreeRateForPeriod = riskFreeRate * yearsTraded
Expand Down