mirror of
https://github.com/andrewkdinh/fund-indicators.git
synced 2024-11-21 14:44:20 -08:00
Update main.py
This commit is contained in:
parent
54817460cc
commit
e865c83662
4
main.py
4
main.py
@ -1218,9 +1218,7 @@ def riskFreeRate():
|
|||||||
Functions.fromCache(f)
|
Functions.fromCache(f)
|
||||||
json_data = f.text
|
json_data = f.text
|
||||||
loaded_json = json.loads(json_data)
|
loaded_json = json.loads(json_data)
|
||||||
riskFreeRate = (loaded_json['dataset']['data'][0][1])/100
|
riskFreeRate = round(float(loaded_json['dataset']['data'][0][1])),2)
|
||||||
riskFreeRate = riskFreeRate * 100
|
|
||||||
riskFreeRate = round(riskFreeRate, 2)
|
|
||||||
print('Risk-free rate:', riskFreeRate, end='\n\n')
|
print('Risk-free rate:', riskFreeRate, end='\n\n')
|
||||||
|
|
||||||
if f.status_code != 200:
|
if f.status_code != 200:
|
||||||
|
Loading…
Reference in New Issue
Block a user