Stock Projection API in Ruby on Rails

Stock Projection API in Ruby on Rails

21 Dec 2016
1 Comments
Stock Projection API in Ruby on Rails

Stock Projection Application basically used for Stock Markets in which shares of publicly held companies are issued and traded either through exchanges or over-the-counter markets. Also known as the equity markets, the stock market is one of the most vital components of a free-market economy, as it provides companies with access to capital in exchange for giving investors a slice of ownership in the company.

 

Function and Purpose of Stock Market

The stock market is one of the most important ways for companies to raise money, along with debt markets which are generally more imposing but do not trade publicly. This allows businesses to be publicly traded, and raise additional financial capital for expansion by selling shares of ownership of the company in a public market. The liquidity that an exchange affords the investors enables their holders to quickly and easily sell securities. This is an attractive feature of investing in stocks, compared to other less liquid investments such as property and other immoveable assets. Some companies actively increase liquidity by trading in their own shares.

 

About Stock Projection Application

This application fetches the recent data of altogether 2161 companies from Yahoo Finance and after some calculation referenced with past 7 days, it will display conditions of “Buy” (i.e whether the company has profit or loss). All company records from the last 10 years are saved in the database and by continuously monitoring these values, the next day prediction of conditions is set. One important property of theses application is it shows the result of companies in JSON format or in table form. So users can save particular company data in documents for their use.

Firstly, these Application fetches updated previous close price from Yahoo Finance and starts calculating Terms used for calculating conditions. It calculates the following terms to set the condition of “Win” or “Loose”

Buy Price – mean(price_array_yearly)- where price_array_yearly is an array of last one-year prices.

Sell Price - Buy Price + target_increase- where target_increase = percentage change in Average Price with taking 5( user-defined) at the numerator

Average Price(Past 01Year) – Calculate mean of last 1 year prices.

Standard Deviation Yearly- Calculate the standard deviation of prices.

Average Monthly Standard Deviation 3 years- Calculate the average of last 3 years standard deviations.

Lifetime Strike Rate- It will monitor 4725 records of trend and check whether the trend >10 or =10, and decides the conditions for “win” or “lose”.

Yearly Strike Rate- It will monitor 365 records of trend and check whether the trend >10 or =10, and decides the conditions for “win” or “lose”.

Gain Momentum In Percentage - Calculate the percentage of the Average price with 5 (user-defined) at the numerator.

Target In Percentage - Calculate the percentage of the Average price with 10 (user-defined) at the numerator.

Conditions – display the result of the win as “Buy” or lose as blank.

 

Conclusion

This application is very useful for people who are investing in the stock market and it helps people to understand and predict stocks, find the possibility of win or lose by monitoring the history of companies' prices.



Comments

Name:

shyam

Message:

how to get this api?

Reply:


Leave a comment: