-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmd_notes.txt
92 lines (60 loc) · 5.22 KB
/
cmd_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
0190000653
0190685933
9970192059 rongzi_rongquan
for i in {1..100} ; do git pull; if [ $? -eq 0 ] ; then break; else echo $?; fi; done
cat /home/ryan/DATA/result/df_report_volatility_AG.csv | sort -t"," -n -k4 -r
for i in {46..1}; do X=`date -d "-$i day" '+%Y-%m-%d'`; python t_daily_update_csv_from_tushare.py -a -e $X; done
for i in `ls`; do A="$(cut -d'.' -f1 <<< $i)"; echo $A.csv; mv $i $A.csv; done
yapf -r -i --style='{based_on_style: pep8, column_limit:2000, SPLIT_PENALTY_AFTER_OPENING_BRACKET}' *.py
black -l 2000 t_summary_new_dev.py
#remove the last line
for i in `ls`; do sed -i '$ d' $i; done
# show the filed of tradingview
awk '{split($0,a,","); print a[1]}' china_latest.csv
# show the rank of the capitalization
grep -Eni "Cap|^300450" /home/ryan/DATA/pickle/Stock_Fundamental/TradingView/china_latest.csv
# show highest openning volume of a FUTU stock
grep -E "09:30|code" ~/DATA/DAY_Global/FUTU_HK/HK.00136_1m.csv | column -t -s, | awk -F" " '{print $1,$2,$9,$10}' | column -t -s" " | sort -k4 -h -r | grep 2022-| head -5
t_summary_new_dev.py
Problem: too late to buy, or the price is already at the highest when the stock be spotted.
Solution: 1. combine a ma cross df 2. candidate expand scope (top 50 etc)
df_hs300_add_candidate, df_jincha_minor
# show the column # of a field
head -1 fina_indicator.csv | sed s/,/\\n/g | grep ts_code -n
output: 1:ts_code
head -1 fina_indicator.csv | sed s/,/\\n/g | grep roe_yoy -n
151:roe_yoy
grep -E "600519.SH|code" fina_indicator.csv | awk '{split($0,a,","); print a[1],a[2],a[3],a[151]}'
ts_code name end_date roe_yoy
600519.SH 贵州茅台 20200930 -6.281000000000001
# sort by the 5th column ascendingly
cat fina_indicator.csv | awk '{split($0,a,","); print a[1],a[2],a[3],a[151], a[156]}' | sort -k 5,5 -n -r | more
# rename file name to all small case
for i in `ls *fina_mainbz_D*`; do mv $i ${i,,} ; done
# run on AG openning, 2.30pm
python t_daily_junxian_barstyle.py --check_my_ma --check_my_ma_allow_delay_min 30 --selected --stock_global AG_HOLD
python t_daily_junxian_barstyle.py --check_my_ma --check_my_ma_allow_delay_min 30 --selected --stock_global AG_HOLD --check_my_ma_force_fetch
# search keywords in main bz (主营业务), sort by 6th column (bz_profit). 5th_bz_sales
grep 车 ~/DATA/result/mainbz_top_companies.csv | column -s',' -t | sort -k6 -g
福田汽车 600166.SH 20201231 汽车行业 5.3e+10 5.5e+09 4.7e+10 CNY 0
中国重汽 000951.SZ 20201231 汽车制造业 6.0e+10 5.7e+09 5.4e+10 CNY 0
福耀玻璃 600660.SH 20201231 汽车玻璃 1.8e+10 6.2e+09 1.2e+10 CNY 0
均胜电子 600699.SH 20201231 汽车零部件(行业) 4.7e+10 6.3e+09 4.1e+10 CNY 0
一汽解放 000800.SZ 20201231 商用车 1.0e+11 9.1e+09 9.4e+10 CNY 0
一汽解放 000800.SZ 20201231 汽车制造业 1.1e+11 1.0e+10 1.0e+11 CNY 0
长安汽车 000625.SZ 20201231 整车 8.3e+10 1.1e+10 7.1e+10 CNY 0
中国中车 601766.SH 20201231 城轨与城市基础设施 5.8e+10 1.1e+10 4.7e+10 CNY 0
长安汽车 000625.SZ 20201231 汽车制造业 8.5e+10 1.2e+10 7.2e+10 CNY 0
华域汽车 600741.SH 20201231 内外饰件类 8.9e+10 1.3e+10 7.5e+10 CNY 0
华域汽车 600741.SH 20201231 内外饰件类(行业) 8.9e+10 1.3e+10 7.5e+10 CNY 0
长城汽车 601633.SH 20201231 销售汽车收入 9.2e+10 1.4e+10 7.8e+10 CNY 0
中国中车 601766.SH 20201231 新产业 7.2e+10 1.5e+10 5.7e+10 CNY 0
长城汽车 601633.SH 20201231 汽车行业 1.0e+11 1.7e+10 8.4e+10 CNY 0
潍柴动力 000338.SZ 20201231 整车及关键零部件 1.2e+11 1.9e+10 9.6e+10 CNY 0
比亚迪 002594.SZ 20201231 汽车 8.4e+10 2.1e+10 6.3e+10 CNY 0
中国中车 601766.SH 20201231 铁路装备 9.0e+10 2.2e+10 6.8e+10 CNY 0
上汽集团 600104.SH 20201231 整车业务 5.3e+11 3.5e+10 5.0e+11 CNY 0
中国中车 601766.SH 20201231 轨道交通装备及其延伸产品和服务 2.3e+11 5.1e+10 1.8e+11 CNY 0
上汽集团 600104.SH 20201231 汽车制造业(行业) 7.2e+11 7.8e+10 6.5e+11 CNY 0
# most decreased stock of industry top
cat /home/ryan/DATA/result/industry_top_mv_eps.csv | column -s',' -t | sort -k 11 -n | vim -