Steps to use the demo

  1. Landing page, just slide.
  2. Login (without username and password, register is not working)
  3. Start searching any stock ticker (Some value might be NAN or Infinity due to data issue)
  4. Add desired tickers into portfolio
  5. Build portfolio, the optimizing process might take more than 10 seconds due to calculation (Error might occurs if BlackRock's api cannot provide the data). ** Recomended tickers: aapl, fb, googl


Edward's (jingyao97) elder brother is a finance student who represented Malaysia in stock challenge. He once asked Edward: "Why isn't there any free tools to simplify stock analysis and perform some calculation on portfolio?", and then the story begins....

What it does

First : A Multi-factor Fundamental Analysis Model User insert a stock ticker symbol, and click search, then BinaryStock will show the overall fundamental performance. This evaluates the stock based on a built multi-factor model with 5 attributes which are: i. Value ii.Growth iii.Liquidity iv. Trends v. Profitability

Second: Portfolio Optimization After searching a stock, user can add it into portfolio list. After few selections, user can build a portfolio, BinaryStock will then get user's risk preference and investment amount. There are 3 risk preferences: "highest return", "least risk" and "highest sharpe ratio", all of them are retrieved from the efficient frontier introduced by Harry Markowitz in his Modern Portfolio Theory. The graph is made up from 10000 random weightage combination of same stocks, using python (jupyter), it is visualized and attached in the screenshots.

Third: Portfolio Analysis Based on the suggested optimized portfolio, BinaryStock will make show the risk, sharpe ratio and return of it by calling BlackRock's api

How we built it

  1. We get stock fundamental info from and build a model based on:P/E ratio, ROE,L/A, increase rate of revenue, cash flow coverage ratio, net profit growth ratio, ROA, short interest ratio, P/B ratio and EPS growth. Calculation is done using javascript.
  2. A calculation is built and graph is plotted to find out the efficient frontier and optimal portfolio combination. This is constructed using python, it runs at our vps. (screenshot of plotted data is attached)
  3. We constructed a website and integrate the calculation into it.

Challenges we ran into

  1. Lack of market data. It took us very long time to find api that provide stock market data for free.
  2. Calculations are not accurate. Before this, we thought our calculation was ok, until we compare our result with BlackRock's result..... We turned out using approximate value
  3. BlackRock api doesn't provide consistent data, some columns are missing for certain portfolio (This will cause error to BinaryStock System).
  4. BlackRock api doesn't provide calculation, so we couldn't find out which part of our calculation leads to difference result with Blackrock api and fix it.
  5. Time limitation. We have to complete calculation and build a functional website within 24 hours, it is super rush!

Accomplishments that we're proud of

  1. Somehow we managed to build a multifactor model, we are so excited as it can be used for quantitative investment, but the model is not mature yet at the moment 2, To calculate the efficient frontier requires a large effort in studying the formula and understand some math concept behind it such as log return, covariance and etc. Yet we hacked it.
  2. We managed to polish our website to have a comfortable UI and UX.
  3. We managed to make a functional website with complex calculation (for us) within 24 hours.
  4. We even made it responsive! (for mobile devices)

What we learned

  1. Lots of finance stuff !!!
  2. UI and UX design skill improvement
  3. New skills: Blackrock api, python library such as numpy and pandas

What's next for BinaryStock

  1. Perform testing and check the true validity of each factor in model. This can be done by checking the covariance of log return and the factor.
  2. Fine tune the score calculation for stock, example: "P/B" score should not be strict for technology company. "ROA" should not be strict to Construction company.
  3. Make filter function so users can filter out the stocks they want from hundreds and thousands of stocks
  4. Macroeconomics and Technical Analysis should all included in the multi-factor model.
  5. Fix and enhance the calculation of Optimizing portfolio so it produce exact value instead of approximate value
Share this project: