GitHub 博客园 Nanakon

随笔分类 -  511.Python

上一页 1 ··· 3 4 5 6 7 8 9 下一页

重定向缓存
摘要:/strategy 重定向到 /strategy/随机id 因为重定向缓存每次重定向到一个固定地址 python去掉/strategy路由也没起作用 阅读全文

posted @ 2016-03-07 11:08 jzm17173 阅读(138) 评论(0) 推荐(0)

UnicodeDecodeError: 'utf-8' codec can't decode byte
摘要:读到了mac的.DS_Store文件 阅读全文

posted @ 2016-03-04 17:52 jzm17173 阅读(188) 评论(0) 推荐(0)

json
摘要:Json概述以及python对json的相关操作 阅读全文

posted @ 2016-03-04 11:34 jzm17173 阅读(96) 评论(0) 推荐(0)

【量化】聚宽
摘要:def initialize(context): # context: UserContext对象, 存放有当前的账户/股票持仓信息 # portfolio Portfolio对象 # current_dt 当前单位时间的开始时间, datetime.datetime对象 # universe 此策略操作的股票池 # 定义一个全局变量, 保... 阅读全文

posted @ 2016-03-03 17:24 jzm17173 阅读(1095) 评论(0) 推荐(0)

【量化】回测字段
摘要:algo_volatility 策略波动率 Algorithm Volatility algorithm_period_return 策略收益 alpha Alpha(阿尔法) 非系统性风险 benchmark_period_return 基准收益 benchmark_volatility 基准波动 阅读全文

posted @ 2016-02-25 14:23 jzm17173 阅读(230) 评论(0) 推荐(0)

notebook笔记
摘要:启动 __main__.py 静态文件 static/ 模板 templates/ 路由 比如tree/handlers.py default_handlers WebSocket ws://localhost:8888/api/kernels/f0164f9e-87c4-4fb8-a730-454 阅读全文

posted @ 2016-02-23 10:21 jzm17173 阅读(243) 评论(0) 推荐(0)

from __future__ import absolute_import
摘要:python __future__ package的几个特性 阅读全文

posted @ 2016-02-23 10:00 jzm17173 阅读(187) 评论(0) 推荐(0)

GUI
摘要:图形界面 from tkinter import * import tkinter.messagebox as messagebox class Application(Frame): def __init__(self, master=None): Frame.__init__(self, mas 阅读全文

posted @ 2016-02-22 15:51 jzm17173 阅读(118) 评论(0) 推荐(0)

version_info
摘要:import sys def check_version(): v = sys.version_info if v.major == 3 and v.minor >= 4: return True print('Your current python is %d.%d. Please use Pyt 阅读全文

posted @ 2016-02-22 15:36 jzm17173 阅读(197) 评论(0) 推荐(0)

函数参数
摘要:关键词变量 阅读全文

posted @ 2016-02-22 15:22 jzm17173 阅读(169) 评论(0) 推荐(0)

None
摘要:0 值的整型 / 浮点型、空字符串('')、空列表([])、 空元组((,))、空字典({})、空集合(set())都等价于 False,但是不等于 None thing = None if thing: print("It's some thing") else: print("It's no t 阅读全文

posted @ 2016-02-22 15:05 jzm17173 阅读(107) 评论(0) 推荐(0)

exec、eval
摘要:#!/usr/bin/env python3 # -*- coding: utf-8 -*- #info #warning def log(message): print('------------------------------') print(message) print('-------- 阅读全文

posted @ 2016-02-22 10:51 jzm17173 阅读(153) 评论(0) 推荐(0)

os
摘要:os.path.sep 路径分隔符 linux下就用这个了’/’ os.path.altsep 根目录 os.path.curdir 当前目录 os.path.pardir 父目录 os.path.abspath(path) 绝对路径 os.path.join() 常用来链接路径 os.path.s 阅读全文

posted @ 2016-02-19 17:31 jzm17173 阅读(144) 评论(0) 推荐(0)

if __name__ == '__main__':
摘要:if __name__ == '__main__': 的解析 是否直接执行 阅读全文

posted @ 2016-02-19 17:12 jzm17173 阅读(111) 评论(0) 推荐(0)

Python
摘要:Unofficial Windows Binaries for Python Extension Packages Python资源 阅读全文

posted @ 2016-02-19 16:03 jzm17173 阅读(116) 评论(0) 推荐(0)

条件判断
摘要:age = 3 if age >= 18: print('adult') elif age >= 6: print('teenager') else: print('kid') s = input('birth:') birth = int(s) if birth < 2000: print('00 阅读全文

posted @ 2016-02-19 15:51 jzm17173 阅读(105) 评论(0) 推荐(0)

【量化】量化交易
摘要:量化投资策略 量化分析 风险指标 Total Returns(策略收益)Benchmark Returns(基准收益)Alpha(阿尔法)Beta(贝塔)Sharpe(夏普比率)Sortino(索提诺比率)Information Ratio(信息比率)Algorithm Volatility(策略波 阅读全文

posted @ 2016-02-18 15:09 jzm17173 阅读(296) 评论(0) 推荐(0)

装饰器 decorator
摘要:装饰器 如果decorator本身需要传入参数 不需要编写wrapper.__name__ = func.__name__这样的代码,Python内置的functools.wraps就是干这个事的 相当于: now = log(now)now = log('execute')(now) 阅读全文

posted @ 2016-02-15 14:18 jzm17173 阅读(115) 评论(0) 推荐(0)

IPython
摘要:IPython 4.0发布:Jupyter和IPython分离后的首个版本 阅读全文

posted @ 2016-02-05 11:24 jzm17173 阅读(143) 评论(0) 推荐(0)

全局变量
摘要: 阅读全文

posted @ 2016-02-04 16:56 jzm17173 阅读(75) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 下一页

导航

轻音