Skip to content

Commit

Permalink
mode755
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonbae81 committed Aug 17, 2019
1 parent 8c8d34a commit 29ad16c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Empty file removed 2019-08-16.txt
Empty file.
Empty file modified day_all.py
100644 → 100755
Empty file.
10 changes: 6 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
date="2019-08-16"
symbol="/tmp/symbol-orig"
temp="/tmp/day"
output="$date.txt"
output="$HOME/$date.txt"

echo "Generating symbol list..."
#~/market/symbol.py | tail -n +2 | awk 'BEGIN {FS=","}; {print $1}' > $symbol
~/market/symbol.py | tail -n +2 | awk 'BEGIN {FS=","}; {print $1}' > $symbol

count=`cat $symbol | wc -l`
echo "Fetching daily prices of $count symbols..."
~/market/day.py -s $symbol -o $temp
rm -rf $temp
cat $symbol | parallel -j 400% ~/market/day.py {} --dir $temp

cat $temp | grep $date | awk 'BEGIN {FS=","}; {OFS="\t"}; {print $2,$3,$4,$5,$6,$7}' | sort > $output

cat $temp/*.csv | grep $date | awk 'BEGIN {FS=","}; {OFS="\t"}; {print $2,$3,$4,$5,$6,$7}' | sort > $output
lines=`cat $output | wc -l`
echo "$lines prices wrote to $output"

0 comments on commit 29ad16c

Please sign in to comment.