Skip to content

rating algo #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Agreement from './pages/agreement'
import { GoogleOAuthProvider } from '@react-oauth/google'
import ReactGA from 'react-ga'
import { useEffect } from 'react'
import StockRatingAlgorithm from './pages/StockRatingAlgorithm'

const TRACKING_ID = import.meta.env.VITE_GA_TRACKING_ID

Expand All @@ -31,6 +32,11 @@ const router = createBrowserRouter([
element: <ScanMutualFunds />,
path: '/scanMutualFunds',
},
{
element: <StockRatingAlgorithm />,
path: '/stockRatingAlgorithm',
errorElement: <div>Unexpected Application Error! 404 Not Found</div>,
},
],
},
])
Expand Down
8 changes: 8 additions & 0 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ const Footer = () => {
tool helps investors track mutual fund stock allocations and assess
the potential of individual stocks.
</p>
<p className="mb-4">
<Link
to="/stockRatingAlgorithm"
className="text-blue-600 hover:underline"
>
Click here to know about our rating algorithm
</Link>
</p>
</div>

<hr className="border-gray-300 w-[87%] mx-auto my-4" />
Expand Down
20 changes: 20 additions & 0 deletions src/components/StockCard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ArrowUp, StarIcon } from 'lucide-react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'

const StockCard = ({ stockData }) => {
return (
Expand Down Expand Up @@ -72,6 +73,25 @@ const StockCard = ({ stockData }) => {
</p>
</div>
</div>
<div className="mt-4 relative group">
<Link
to="/stockRatingAlgorithm"
className="text-blue-600 hover:underline"
>
*Know more
</Link>
<div className="absolute left-0 top-full mt-2 w-full bg-white p-4 border border-gray-300 rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity duration-300 backdrop-blur-sm">
<p className="text-sm font-medium text-muted-foreground">
Stock Rating Algorithm - Overview Our stock rating algorithm
provides a comprehensive score by analyzing individual stock
metrics, trends over time, and comparisons with peer companies.
The algorithm uses multiple factors to evaluate a stock’s
performance, including financial metrics, trends in quarterly
results, and comparisons against industry peers. Click to know
more...
</p>
</div>
</div>
</div>
</div>
)
Expand Down
10 changes: 10 additions & 0 deletions src/pages/StocksPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState } from 'react'
import axios from 'axios'
import { Link } from 'react-router-dom'

const StocksPage = () => {
const [stocks, setStocks] = useState([])
Expand Down Expand Up @@ -151,6 +152,15 @@ const StocksPage = () => {
Next
</button>
</div>

<div className="text-center mt-8">
<Link
to="/stockRatingAlgorithm"
className="text-blue-600 hover:underline"
>
Learn About Our Rating Algorithm
</Link>
</div>
</div>
</div>
)
Expand Down
73 changes: 73 additions & 0 deletions src/pages/stockRatingAlgorithm.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { Link } from 'react-router-dom'

const StockRatingAlgorithm = () => {
return (
<div className="container mx-auto mt-20 mb-8 border border-gray-300 rounded-lg shadow-md p-6 bg-white">
<h1 className="text-2xl font-bold mb-4 text-center">
Stock Rating Algorithm Overview
</h1>
<p className="mb-4">
Our stock rating algorithm provides a comprehensive score by analyzing
individual stock metrics, trends over time, and comparisons with peer
companies. The algorithm uses multiple factors to evaluate a stock’s
performance, including financial metrics, trends in quarterly results,
and comparisons against industry peers.
</p>
<h2 className="text-xl font-bold mb-2">
Here’s how the scoring is computed:
</h2>
<h3 className="text-lg font-bold mb-2">Trend Analysis (40% Weight):</h3>
<ul className="list-disc list-inside mb-4">
<li>
The algorithm assesses the stock’s quarterly performance by comparing
consecutive quarters.
</li>
<li>
Each improvement or decline in key metrics (like sales or profit)
adjusts the trend score accordingly.
</li>
<li>
This ensures that positive trends over time contribute to a higher
score.
</li>
</ul>
<h3 className="text-lg font-bold mb-2">Peer Comparison (50% Weight):</h3>
<ul className="list-disc list-inside mb-4">
<li>
The stock is evaluated against peer companies using metrics like P/E
ratio, market cap, dividend yield, ROCE, sales, and profit.
</li>
<li>
A stock earns points by outperforming peers or staying competitive in
these metrics.
</li>
<li>
An additional check compares the stock’s metrics with the median of
the peers, further refining the score.
</li>
</ul>
<h3 className="text-lg font-bold mb-2">Scoring Logic:</h3>
<ul className="list-disc list-inside mb-4">
<li>
The final score is a weighted combination of trend analysis and peer
comparison results.
</li>
<li>
Each component is normalized to ensure consistency across different
datasets and company sizes.
</li>
<li>The score is rounded to two decimal places for readability.</li>
</ul>
<p className="mb-4">
This data-driven approach helps provide a balanced rating by combining
historical performance with real-time peer benchmarking, making it a
valuable tool for investors seeking reliable insights.
</p>
<Link to="/" className="text-blue-600 hover:underline">
Back to Homepage
</Link>
</div>
)
}

export default StockRatingAlgorithm
Loading