1 Star 0 Fork 0

jx0913/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/jx0913/stock.git
git@gitee.com:jx0913/stock.git
jx0913
stock
stock
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385