Git Product home page Git Product logo

system_trading's People

Contributors

happineer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

system_trading's Issues

키움 조건검색식 성능평가

키움의 조건검색식을 이용하여 종목의 매수signal을 받게 되는데
signal 이 적절한 시점에 발생하는지 여부를 chart 를 통해 확인한다.
(1분봉과 signal이 발생한 시점을 함께 차트로 보여준다.)

mongo db에 stock price 저장하기

kospi 모든 종목(약 900여개)에 대해 분봉/일봉/주봉/월봉 데이터를 저장한다.
db/collection/document scheme에 대해 고민한다.
분봉의 경우 1,3,5,10 틱만 저장한다.
모든 차트 데이터는 2018년도 데이터만 저장한다.
모든 데이터를 저장하는 collection과 최신 데이터를 보관하는 collection을 분리/운용한다.
몽고DB에 indexing/unique/duplicate설정을 한다.

업종코드 DB화

업종코드를 정의하고, 개별 주식정보에 업종코드를 추가한다.

finding useful tr list

make useful transition function list about system-trading.
It will be meterial which should be implemented

시뮬레이션 결과 시각화

시뮬레이션 완료 후, 분석데이터(거래이력, 각종 매매지표, 수익성, 개선점, 상관도)를 다양하게 시각화

거래이력(TradingHistory) 기록

조건검색식 시뮬레이션 하면서 매수/매도 의 모든 기록을 DB에 저장하고
원하는 형태로 필터링해서 보여주는 기능을 담당하는 TradingHistory 구현

human error 방지 코드 추가(거래가능시간, 매수/매도 sequence)

전략파일에 json 타입으로 전략관련 데이터를 작성하는데,
거래가능시간이 잘못 겹친다든지, 장 open/close 시간을 넘어선다든지
매수/매도 sequence가 잘못되어 알고리즘이 깨질수 있다든지
이런 부분에 대해 미리 check 하는 부분을 app 제일 앞단에 위치..

elaborate a trading strategy

apply tax (0.035)
adjust stock price(bid price/offered price)

  • bid price ( upper than 1step )
  • offered price ( lower than 1tep )

시뮬레이션 Performance 개선

약 20개 이상의 조건검색식 결과를 시뮬레이션 하는데 현재 꽤 많은 시간이 소요되고 있음
개별 종목의 수익성 분석을 위해 1초단위로 loop를 도는대서 대부분의 시간이 소요되고 있음.

  • 중복데이터의 DB접근 횟수 줄이기
  • 1초가 아니라 2~5초 정도로 resample 하는것은 어떤지?
  • 개별종목별 DataFrame 정보가 있으니, 개별종목별로 DataFrame api 이용해서 수익성 분석가능한지?
    -> 1초단위로 돌면서 매수/매도시점을 분석하는 것이 아니라, 어떤 가격에 매수/매도 할지는 전략파일에 있으니, 해당 가격에 match 되는 제일 가까운 시간을 찾는 알고리즘 고민...

계좌조회 TR 구현

계좌현황을 조회하는 TR 구현

  1. 매수시 계좌 잔고내에서 매수주문이 나가야 함
  2. 매도시 계좌내 주식수익률을 기반으로 매도 주문이 나가야 함
  3. UI에 잔고와 수익률 현황을 실시간을 뿌려야 함

loop돌면서 시뮬레이션 할때 객체 초기화

현재 조건검색식 마다 loop돌면서 simulation하는데,
loop를 한번 돌고나서, 다음 조건검색식 simulation할때, 관련 객체들이 초기화 되지 않아
2번째 조건검색식부터는 아무것도 동작을 안함

--> 객체(Account, Stock, Strategy, StrategyConfig 등)를 모두 초기화 할수 있는 방법 필요

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.