I created a Search Engine for Stock's ROI Analysis using Vue and Node JS
Tags: javascript, node, vue, algorithms
Published: 2022-07-25 04:16:00

<h2>Brief Overview</h2>
<p>
I created this search engine called <a href="https://savajava.github.io/">SavaJava</a> which helps to screen any stocks in USA(NYSE & NASDAQ), Malaysia(KLSE) and Singapore(SGX) exchanges.
The app does three 3 things:
<ol type="1">
 <li>General Use - Provides Web Search Functionality for general users</li>
 <li>Developer Use - Provides RESTful Web Service for developers</li>
 <li>Provides independent Analytics using in-house algorithms on screened stocks (more on this later <a href="#architecture">here</a>!)</li>
</ol>
</p>

<hr/>

<h2 id="architecture">Architecture</h2>
<p>
This application is built on Vue JS for the client and Node JS for the server. Although I got to admit I enjoyed working on the server more as it houses many in-house algorithms there such as:
<ol type="1">
 <li>Dividend Frequency Detector Algorithm (Responsible for checking whether a stock pays dividend Annually, Bi-Annually, Quarterly or Monthly)</li>
 <li>Dividend Suspension Detector Algorithm (Responsible for checking whether how many times a stock had suspended or missed its dividend payment dues)</li>
 <li>Real-Time Forward Yield Algorithm (Responsible for displaying accurate yield based on latest dividend data and other analytics)</li>
 <li>Dynamic Search Query Algorithm (Responsible for checking and transforming user input search query into payload that is acceptable by the API endpoint for processing)</li>
 <li>Dynamic API Key Generator Algorithm (Responsible for generating dynamic API Key on daily basis to protect the server from brute forced or overloaded)</li>
</ol>
</p>

<hr/>

<h2>General Use Case</h2>
<p>The <kbd>Web Search</kbd> returns 3 things, which are <strong>Dividend Analysis</strong>, <strong>Fundamentals</strong>, and <strong>Dividend History</strong>. There is no restriction on the app on who can use the web search functionality. Doesn't matter if the user is an investor, accountant, financial analyst, trader, banker or even developer, still they will find it useful before they commit their hard-earned money to any investment decisions.</p>
<img src="https://user-images.githubusercontent.com/108166534/179158846-4da7d77d-4315-4dd9-9d12-bcdae3e92314.png">
<figcaption>Figure 1.0 - Shows <kbd>Web Search</kbd> mode, where user is searching for Apple stock(NASDAQ)</figcaption>

<img src="https://user-images.githubusercontent.com/108166534/179159105-94d972b6-b13e-4fe5-bd89-c9fb3b4aae5c.png">
<figcaption>Figure 1.1 - Search result for Apple stock (NASDAQ), notice that Apple has suspended its dividend once</figcaption>

<img src="https://user-images.githubusercontent.com/108166534/179159449-e914af84-dec3-42a6-b59b-8bdefa2885b2.png">
<figcaption>Figure 1.2 - Search result for Netflix stock (NASDAQ), the system alerts that Netflix never paid dividend, only shows the Fundamentals section.</figcaption>

<br/>

{% youtube vrZvnaYIOGQ %}
<figcaption>Video 1.3 - Step by step example for using search query for <kbd>Web Search</kbd></figcaption>

<hr/>

<h2>Developer Use Case - How to Consume this API</h2>
<p>I have created and published an API Playground for this project in Rapid API for developers for seamless integration and also this <a href="https://rapidapi.com/moneygoddess888/api/nasdaq-stocks-dividend-history-live">endpoint</a> doesn't require API Key for making API calls.</p>
<h4>To get API for Nasdaq (US) stocks:</h4>
<ul>
 <li>Simply type the target Stock’s ticker symbols into the Param’s field in the endpoint [eg: MSFT for Microsoft or AAPL for Apple]</li>
 <li>You can also refer this <a href="https://www.nasdaq.com/market-activity/stocks/screener">official NASDAQ website</a> to reconfirm the NASDAQ stock’s ticker symbols should you need assistance</li>
</ul>

<h4>To get API for SGX (Singaporean) stocks:</h4>
<ul>
 <li>Simply type the target Stock’s ticker symbols and append this string ‘.SG’ into the Param’s field in the endpoint [eg: Z74.SG for Singapore Telecommunications Limited or D05.SG for DBS Group Holdings Ltd]</li>
 <li>You can also refer this <a href="https://www.sgx.com/securities/stock-screener">official SGX website</a> to reconfirm the SGX stock’s ticker symbols should you need assistance</li>
</ul>

<h4>To get API for KLSE (Malaysian) stocks:</h4>
<ul>
 <li>Simply type the target Stock’s ticker symbols and append this string ‘.MY’ into the Param’s field in the endpoint [eg: 1155.MY for Malayan Banking Berhad or 3182.MY for Genting Berhad] </li>
 <li>You can also refer this <a href="https://www.bursamalaysia.com/">official KLSE website</a> to reconfirm the KLSE stock’s ticker symbols should you need assistance</li>
</ul>

<img src="https://user-images.githubusercontent.com/108166534/179157351-935befb0-18ea-4143-ada8-ab814dce251f.png">
<figcaption>Figure 2.0 - Developer searching for Apple Stock(NASDAQ) using its ticker symbol 'AAPL', notice there is a field for API Key to be input too</figcaption>

<img src="https://user-images.githubusercontent.com/108166534/179157464-1ca46a68-9617-4dea-bce5-c1e3a5996eb4.png">
<figcaption>Figure 2.1 - Server approves the request and validates the valid API Key and returns the result for 'AAPL' in JSON format</figcaption>

<img src="https://user-images.githubusercontent.com/108166534/179157941-a8962074-b2ce-4751-8a9d-6dd644eda692.png">
<figcaption>Figure 2.2 - Server denies the request and invalidates the wrong API Key and returns the appropriate response</figcaption>

<hr />

<h2>Documentation</h2>
<p>You can read more about SavaJava's Official <a href="https://github.com/savajava/savajava.github.io/blob/main/README.md">Documentation</a> in its official GitHub account</p>

<hr />

<h2>Sponsor</h2>
<p>You can donate to support this project <a href="https://www.paypal.com/paypalme/rubanero">here</a> and feel free to drop us a comment on what you want to see as improvement or additions into the project</p>

<hr />

<h2>Collaberate</h2>
<p>If you think you can bring in some improvements and addition for this app, you can <a href="https://www.linkedin.com/in/rajaruban-rajindram/">DM</a> me via LinkedIn, I can add you into the project to work on.</p>

Thanks and have great day fellow Devs!