Giter Site home page Giter Site logo

yongquan's Introduction

gem purpose

  1. download and maintenace daily k data
  2. init strategy
  3. provide API to higher layer

why name yongquan?

yongquan is a xuewei under the foot. it means it is a basic module to provide api to higher layer

usage

  • require 'yongquan'

Test example

  • rake test ; to run all case
  • rake test TEST="test/test_init.rb"

reference

make own gem

http://guides.rubygems.org/make-your-own-gem/

API service

  • Global variable service

$target_strategy_file

  • provide target strategy file full path with name

$all_stock_list

  • provide a hash , key is yahoo id , and value is stock name

$working_day_hash

  • provide a hash, key is 2014 date, value is true/false , means open or close of market

provide a strategy class

  • Strategy.send(strategy).root_path

provide email sent service

  • email_notify(strategy,title,body)

provide yahoo id to sina id

  • convert_yahoo_symbol_to_sina(yahoo_symbol)

provide api to initialize a single stock folder

  • initialize_single_stock_folder(strategy,symbol)

provide data gap calculation

  • get_last_date_of_raw_date(strategy,symbol)
  • get_last_date_of_raw_process_date(strategy,symbol)
  • get_last_date_of_signal(strategy,symbol)
  • get_last_date_of_win_lost(strategy,symbol)
  • check_working_day?(date)
  • get_gap_date_array(start_date,end_date)

Yahoo download history APi

  • download_yahoo_history(strategy,symbol)
  • batch_download_yahoo_history(strategy)

append raw data with real data

  • append_raw_data(strategy,symbol)
  • batch_append_raw_data(strategy,symbol_array)

yongquan's People

Contributors

grasp avatar

Watchers

James Cloos 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.