Skip to content

Commit

Permalink
Merge pull request #14 from tejtw/1.0.0rc1
Browse files Browse the repository at this point in the history
1.0.0rc1
  • Loading branch information
tej87681088 authored Dec 1, 2023
2 parents 8c0b254 + b318bd2 commit ce5151f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/zipline/sources/TEJ_Api_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import zipline.algorithm as algo

from zipline.utils.calendar_utils import get_calendar
from zipline.utils.input_validation import (expect_types,
validate_keys)

from zipline.utils.input_validation import (
expect_types,
validate_keys,
optional
)
from zipline.errors import (MultipleSymbolsFound,
SymbolNotFound,
IllegalValueException,
Expand Down Expand Up @@ -729,12 +731,12 @@ def Treasury_Return_TW(start,
pass


# 銀行定存利率
# 銀行定存利率
if rate_type=='Time_Deposit_Rate':

if symbol not in Valid_Time_Deposit_Rate:
raise IllegalValueException(parameter = '"symbol"',
value = str(list(set(Valid_Time_Deposit_Rate.keys()))))
value = str(list(set(Valid_Time_Deposit_Rate.keys()))))

df = tejapi.get('TWN/ARATE',
coid = '5844',
Expand Down Expand Up @@ -764,7 +766,7 @@ def Treasury_Return_TW(start,
@expect_types(
rate_type=str,
term=str,
symbol=str or type(None) # FIXME use zipline.utils.input_validation.optional
symbol=optional(str)
)
def get_Treasury_Return(start,
end,
Expand Down

0 comments on commit ce5151f

Please sign in to comment.