1 Star 0 Fork 1

ichao1214 / stock

forked from rzxxysy / stock 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
statistices.py 450 Bytes
一键复制 编辑 原始数据 按行查看 历史
Rockyzsu 提交于 2018-07-04 23:01 . change to py3
#-*-coding=utf-8-*-
'''
用于统计数据
'''
import alert
'''
计算收益
sold 卖价
buy 买入价
'''
def percentage(sold,buy):
x=(sold-buy)*1.00/buy*100
print(round(x,2))
return x
'''
计算买入价
sold: 卖出的价格
需要的幅度
'''
def plan_buy_price(sold,percent):
buy=sold*1.00/(1+percent*1.00/100)
print(round(buy,2))
return buy
#percentage(0.196,0.188)
# plan_buy_price(10,10)
a=1.567
print(round(a,2))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ichao1214/stock.git
git@gitee.com:ichao1214/stock.git
ichao1214
stock
stock
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891