Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WesleyDevLab/cheetah
/ functions
Functions
42 in github.com/WesleyDevLab/cheetah
⨍
Functions
42
◇
Types & classes
4
↓ 9 callers
Function
is_working_hour
检查今天是否是交易时间段 :param dt: :return:
utils.py:71
↓ 5 callers
Function
get_conn
()
db.py:20
↓ 3 callers
Method
parse
(self, url)
StockBlock.py:38
↓ 2 callers
Function
get_db_file_name
()
db.py:49
↓ 2 callers
Function
is_working_day
检查某天是否是工作日,周一为0 :param dt: :return:
utils.py:59
↓ 2 callers
Function
save_file
(stock_list)
db.py:53
↓ 1 callers
Function
get_page
(url)
utils.py:87
↓ 1 callers
Method
list_detail
实时获取股票板块详细数据 :param stock_block_type: :return:
StockBlock.py:65
↓ 1 callers
Function
load_file
()
db.py:59
↓ 1 callers
Function
parse_page
(url)
utils.py:93
Function
MA
(stock_data, timeperiod=30)
stocks.py:29
Function
MACD
(stock_data, fast_period=12, slow_period=26, signal_period=9)
stocks.py:18
Method
__init__
(self)
StockBlock.py:35
Method
__init__
(self, feed, instrument)
pyalgo.py:10
Method
__init__
(self, feed, instrument, smaPeriod)
strategy/SMACrossOver.py:10
Function
download
(url)
common/downloader.py:7
Function
exist
(key)
db.py:35
Function
f
结果四舍五入保留两位小数 :param num: 待格式化数字 :return:
utils.py:9
Function
filter
(index, day=60)
stocks.py:52
Function
get
(key)
db.py:40
Method
getSMA
(self)
strategy/SMACrossOver.py:19
Function
get_start_date
获取n天前的日期 now = datetime.now() print now.strftime('%Y-%m-%d') strNow = '2012-01-03' nowDate = time.strptime(strNow, "%Y-%m-%d")
utils.py:19
Function
golden_cross
(metric_first, metric_second)
stocks.py:36
Method
list
(self, stock_block_type)
StockBlock.py:80
Function
list_stock
()
stocks.py:46
Function
load_db
()
db.py:44
Method
onBars
(self, bars)
pyalgo.py:18
Method
onBars
(self, bars)
strategy/SMACrossOver.py:32
Method
onEnterCanceled
(self, position)
strategy/SMACrossOver.py:22
Method
onExitCanceled
(self, position)
strategy/SMACrossOver.py:28
Method
onExitOk
(self, position)
strategy/SMACrossOver.py:25
Method
preload
()
StockBlock.py:132
Function
realtime
(symbol)
stocks.py:77
Function
save
(key, value, expire=DATA_EXPIRED_TIME)
db.py:30
Function
save_db
(stock_list)
db.py:25
Method
setUp
(self)
testcases/utils_test.py:8
Method
tearDown
(self)
testcases/utils_test.py:11
Method
test_get_page
(self)
testcases/utils_test.py:37
Method
test_is_working_day
(self)
testcases/utils_test.py:33
Method
test_is_working_hour
(self)
testcases/utils_test.py:14
Function
tick_history
(symbol, date)
stocks.py:85
Function
tick_today
(symbol)
stocks.py:81