whalec / stock-desk Goto Github PK
View Code? Open in Web Editor NEWSmall Ruby based stock trading DSL - It's a work in progress
Small Ruby based stock trading DSL - It's a work in progress
Portfolio is a stock management and analysis system written in Ruby. It aims to offer a clean and extensible DSL for the creation of a stock portfolio, allowing you to run it on a daily basis to analyse a large number of stock symbols(available through finance.yahoo.com). A simple example is as follows: Portfolio.chart :gld do study :simple_moving_average, 15, 28 end This will download the gold(GLD) chart and add two SMA's to it at lengths of 15 & 28. They can then be accessed through Portfolio[:gld] => <Portfolio::Chart ... Portfolio[:gld].ticks[100].sma_15 => 45.5 Or whatever the SMA at a length of 15 is # TODO: Add a better way to get to ticks then through standard array syntax # ISSUES If you come across any issues/errors with any of the code especially the algorithms, or if you find a faster(I only care if it's faster or incorrect) way to do an algorithm, please send a patch # TODO 1. Add analysis DSL to run analysis over your portfolio 2. Add a messaging layer for communicating with owner 3. Add a persistence layer to know what you're portfolio state is(i.e. bought, sold, or just watching) 4. Add more algorithms 5. Optimise existing algorithms for speed 6. Add database support for caching charts in the db(not that important IMO) # EVENTUALLY You be able to use a DSL file, something like. long_trade.tdp Portfolio(:long) do study :simple_moving_average, 15, 28 action :email, "[email protected]" do when sma_15, :crosses, sma_28 end end Portfolio(:long).add :charts => [:spy, :gld, :aapl, :msft]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.