Code Monkey home page Code Monkey logo

options-bi's Introduction

抓关注股的期权代码清单 time python3 find_concerned_stocks.py active | awk '/^US/{print $1}' | while read line; do start=$(echo "gdate +%s.%3N" | bc); python3 find_options.py $line all; s=$(echo "3 - (gdate +%s.%3N - $start)" | bc); if [ $s > 0 ] ; then sleep $s; fi; done | awk '/^US/' > options_codes.active.txt

抓期权具体信息 time cat options_codes.active.txt | while read line; do python3 find_snapshots.py $line all; done | awk '/^US/' > concerned_stocks_options.active.txt

过滤和输出 cat concerned_stocks_options.active.txt | sort -k 2 -r -n | awk -F'[1,2]' '{print $0, $1}' | awk 'function abs(x){return ((x < 0.0) ? -x : x)};$2>50 && $4>0 && $6 > 8 && $9 > 8 && abs($7) > 0 && abs($7) < 0.4' | awk 'BEGIN{printf "%-22s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n", "code", "sell_apy", "premium", "out", "price", "op_buy", "volume", "oi", "iv", "delta"}{printf "%-22s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n", $1, $2"%", $6"%", $9"%", "$"$8, "$"$3, $10, $4, $5, $7}'

合并最后两步 time cat options_codes.active.txt | while read line; do python3 find_snapshots.py $line all; done | awk '/^US/' | sort -k 2 -r -n | awk -F'[1,2]' '{print $0, $1}' | awk 'function abs(x){return ((x < 0.0) ? -x : x)};$2>50 && $4>0 && $6 > 8 && $9 > 8 && abs($7) > 0 && abs($7) < 0.4' | awk 'BEGIN{printf "%-22s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n", "code", "sell_apy", "premium", "out", "price", "op_buy", "volume", "oi", "iv", "delta"}{printf "%-22s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n", $1, $2"%", $6"%", $9"%", "$"$8, "$"$3, $10, $4, $5, $7}'

options-bi's People

Contributors

zicjin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.