indicator fixes

This commit is contained in:
MuslemRahimi 2025-04-02 01:16:38 +02:00
parent a1f71dbff5
commit 092c4be4a4
6 changed files with 33 additions and 33 deletions

View File

@ -125,7 +125,7 @@
{ name: "FCF Yield", rule: "freeCashFlowYield", type: "percent" }, { name: "FCF Yield", rule: "freeCashFlowYield", type: "percent" },
{ name: "Employees", rule: "employees", type: "decimal" }, { name: "Employees", rule: "employees", type: "decimal" },
{ name: "Debt Ratio", rule: "debtRatio", type: "float" }, { name: "Debt Ratio", rule: "debtRatio", type: "float" },
{ name: "Debt / Equity", rule: "debtEquityRatio", type: "int" }, { name: "Debt / Equity", rule: "debtToEquityRatio", type: "int" },
{ name: "Profit Margin", rule: "netProfitMargin", type: "percent" }, { name: "Profit Margin", rule: "netProfitMargin", type: "percent" },
{ name: "FTD Shares", rule: "failToDeliver", type: "int" }, { name: "FTD Shares", rule: "failToDeliver", type: "int" },
{ name: "Relative FTD", rule: "relativeFTD", type: "percent" }, { name: "Relative FTD", rule: "relativeFTD", type: "percent" },

View File

@ -690,7 +690,7 @@
defaultValue: "any", defaultValue: "any",
category: "Valuation & Ratios", category: "Valuation & Ratios",
}, },
priceEarningsToGrowthRatio: { priceToEarningsGrowthRatio: {
label: "PEG Ratio", label: "PEG Ratio",
step: [100, 10, 5, 3, 1, 0.5, 0], step: [100, 10, 5, 3, 1, 0.5, 0],
defaultCondition: "over", defaultCondition: "over",
@ -777,7 +777,7 @@
defaultCondition: "over", defaultCondition: "over",
defaultValue: "any", defaultValue: "any",
}, },
debtEquityRatio: { debtToEquityRatio: {
label: "Debt / Equity", label: "Debt / Equity",
step: [50, 40, 30, 20, 10, 5, 1], step: [50, 40, 30, 20, 10, 5, 1],
@ -880,7 +880,7 @@
defaultValue: "any", defaultValue: "any",
category: "Valuation & Ratios", category: "Valuation & Ratios",
}, },
priceToFreeCashFlowsRatio: { priceToFreeCashFlowRatio: {
label: "Price / FCF", label: "Price / FCF",
step: [50, 20, 10, 5, 1, 0, -1, -5, -10, -20, -50], step: [50, 20, 10, 5, 1, 0, -1, -5, -10, -20, -50],
@ -888,7 +888,7 @@
defaultValue: "any", defaultValue: "any",
category: "Cash Flow", category: "Cash Flow",
}, },
interestCoverage: { interestCoverageRatio: {
label: "Interest Coverage", label: "Interest Coverage",
step: [10, 5, 3, 2, 1, 0], step: [10, 5, 3, 2, 1, 0],
@ -1058,7 +1058,7 @@
defaultValue: "any", defaultValue: "any",
category: "Valuation & Ratios", category: "Valuation & Ratios",
}, },
priceEarningsRatio: { priceToEarningsRatio: {
label: "Price / Earnings", label: "Price / Earnings",
step: [100, 50, 20, 10, 5, 0], step: [100, 50, 20, 10, 5, 0],
@ -2238,7 +2238,7 @@ const handleKeyDown = (event) => {
name: "Undervalued Stocks", name: "Undervalued Stocks",
rules: [ rules: [
{ condition: "under", name: "marketCap", value: "100M" }, { condition: "under", name: "marketCap", value: "100M" },
{ condition: "over", name: "debtEquityRatio", value: 1 }, { condition: "over", name: "debtToEquityRatio", value: 1 },
{ condition: "over", name: "debtRatio", value: -0.5 }, { condition: "over", name: "debtRatio", value: -0.5 },
{ condition: "over", name: "eps", value: 0 }, { condition: "over", name: "eps", value: 0 },
], ],

View File

@ -109,19 +109,19 @@
text: "Sales Maturities of Investments signifies the selling or maturity of financial assets like stocks or bonds by a company. It represents an inflow of cash resulting from these investment activities.", text: "Sales Maturities of Investments signifies the selling or maturity of financial assets like stocks or bonds by a company. It represents an inflow of cash resulting from these investment activities.",
}, },
{ {
propertyName: "otherInvestingActivites", propertyName: "otherInvestingActivities",
growthPropertyName: "growthOtherInvestingActivites", growthPropertyName: "growthOtherInvestingActivites",
label: "Other Investing Acitivies", label: "Other Investing Acitivies",
text: "Other investing activities are investing activities that do not belong to any of the categories we mentioned so far.", text: "Other investing activities are investing activities that do not belong to any of the categories we mentioned so far.",
}, },
{ {
propertyName: "netCashUsedForInvestingActivites", propertyName: "netCashProvidedByInvestingActivities",
growthPropertyName: "growthNetCashUsedForInvestingActivites", growthPropertyName: "growthNetCashUsedForInvestingActivites",
label: "Investing Cash Flow", label: "Investing Cash Flow",
text: "Investing cash flow is the total change in cash from buying and selling investments and long-term assets.", text: "Investing cash flow is the total change in cash from buying and selling investments and long-term assets.",
}, },
{ {
propertyName: "debtRepayment", propertyName: "netDebtIssuance",
growthPropertyName: "growthDebtRepayment", growthPropertyName: "growthDebtRepayment",
label: "Debt Repayment", label: "Debt Repayment",
text: "Debt Repayment is the process of paying off loans or debt obligations. It represents an outflow of cash as the company reduces its outstanding debt.", text: "Debt Repayment is the process of paying off loans or debt obligations. It represents an outflow of cash as the company reduces its outstanding debt.",
@ -133,20 +133,20 @@
text: "The cash gained from issuing shares, or cash spent on repurchasing shares via share buybacks. A positive number implies that the company issued more shares than it repurchased. A negative number implies that the company bought back shares.", text: "The cash gained from issuing shares, or cash spent on repurchasing shares via share buybacks. A positive number implies that the company issued more shares than it repurchased. A negative number implies that the company bought back shares.",
}, },
{ {
propertyName: "dividendsPaid", propertyName: "netDividendsPaid",
growthPropertyName: "growthDividendsPaid", growthPropertyName: "growthDividendsPaid",
label: "Dividend Paid", label: "Dividend Paid",
text: "The total amount paid out as cash dividends to shareholders.", text: "The total amount paid out as cash dividends to shareholders.",
}, },
{ {
propertyName: "otherFinancingActivites", propertyName: "otherFinancingActivities",
growthPropertyName: "growthOtherFinancingActivites", growthPropertyName: "growthOtherFinancingActivities",
label: "Other Financial Acitivies", label: "Other Financial Acitivies",
text: "Other financial activities includes miscellaneous financial transactions beyond regular operations that impact a company's cash flow.", text: "Other financial activities includes miscellaneous financial transactions beyond regular operations that impact a company's cash flow.",
}, },
{ {
propertyName: "netCashUsedProvidedByFinancingActivities", propertyName: "netCashProvidedByFinancingActivities",
growthPropertyName: "growthNetCashUsedProvidedByFinancingActivities", growthPropertyName: "growthNetCashProvidedByFinancingActivities",
label: "Financial Cash Flow", label: "Financial Cash Flow",
text: "Financing cash flow is the total change in cash through financing activities. This includes dividend payments, share issuance and repurchases, changes in debt levels and others.", text: "Financing cash flow is the total change in cash through financing activities. This includes dividend payments, share issuance and repurchases, changes in debt levels and others.",
}, },

View File

@ -37,12 +37,12 @@
const statementConfig = [ const statementConfig = [
{ {
propertyName: "priceEarningsRatio", propertyName: "priceToEarningsRatio",
label: "PE Ratio", label: "PE Ratio",
text: "The price-to-earnings (P/E) ratio is a valuation metric that shows how expensive a stock is relative to earnings.", text: "The price-to-earnings (P/E) ratio is a valuation metric that shows how expensive a stock is relative to earnings.",
}, },
{ {
propertyName: "priceEarningsToGrowthRatio", propertyName: "priceToEarningsGrowthRatio",
label: "PEG Ratio", label: "PEG Ratio",
text: "The price-to-earnings (P/E) ratio is a valuation metric that shows how expensive a stock is relative to earnings.", text: "The price-to-earnings (P/E) ratio is a valuation metric that shows how expensive a stock is relative to earnings.",
}, },
@ -57,12 +57,12 @@
text: "The price-to-book (P/B) ratio measures a stock's price relative to book value. Book value is also called Shareholders' equity.", text: "The price-to-book (P/B) ratio measures a stock's price relative to book value. Book value is also called Shareholders' equity.",
}, },
{ {
propertyName: "priceToFreeCashFlowsRatio", propertyName: "priceToFreeCashFlowRatio",
label: "P/FCF Ratio", label: "P/FCF Ratio",
text: "The price to free cash flow (P/FCF) ratio is similar to the P/E ratio, except it uses free cash flow instead of accounting earnings.", text: "The price to free cash flow (P/FCF) ratio is similar to the P/E ratio, except it uses free cash flow instead of accounting earnings.",
}, },
{ {
propertyName: "priceToOperatingCashFlowsRatio", propertyName: "priceToOperatingCashFlowRatio",
label: "P/OCF Ratio", label: "P/OCF Ratio",
text: "The price to operating cash flow (P/OCF) ratio measures the price of a stock relative to operating cash flow.", text: "The price to operating cash flow (P/OCF) ratio measures the price of a stock relative to operating cash flow.",
}, },
@ -72,7 +72,7 @@
text: "The operating cash flow to sales (OCF/S) Ratio assesses how well sales convert to cash. It's the operating cash flow divided by net sales, indicating cash efficiency.", text: "The operating cash flow to sales (OCF/S) Ratio assesses how well sales convert to cash. It's the operating cash flow divided by net sales, indicating cash efficiency.",
}, },
{ {
propertyName: "debtEquityRatio", propertyName: "debtToEquityRatio",
label: "Debt / Equity Ratio", label: "Debt / Equity Ratio",
text: "The debt-to-equity ratio measures a company's debt levels relative to its shareholders' equity or book value. A high ratio implies that a company has a lot of debt.", text: "The debt-to-equity ratio measures a company's debt levels relative to its shareholders' equity or book value. A high ratio implies that a company has a lot of debt.",
}, },
@ -92,7 +92,7 @@
text: "The asset turnover ratio measures the amount of sales relative to a company's assets. It indicates how efficiently the company uses its assets to generate revenue.", text: "The asset turnover ratio measures the amount of sales relative to a company's assets. It indicates how efficiently the company uses its assets to generate revenue.",
}, },
{ {
propertyName: "interestCoverage", propertyName: "interestCoverageRatio",
label: "Interest Coverage", label: "Interest Coverage",
text: "The interest coverage ratio is a measure of the ability of a company to pay its interest expenses. It is calculated by dividing the company's Earnings Before Interest and Taxes (EBIT) by its interest expenses.", text: "The interest coverage ratio is a measure of the ability of a company to pay its interest expenses. It is calculated by dividing the company's Earnings Before Interest and Taxes (EBIT) by its interest expenses.",
}, },
@ -117,7 +117,7 @@
text: "The dividend yield is how much a stock pays in dividends each year, as a percentage of the stock price.", text: "The dividend yield is how much a stock pays in dividends each year, as a percentage of the stock price.",
}, },
{ {
propertyName: "payoutRatio", propertyName: "dividendPayoutRatio",
label: "Payout Ratio", label: "Payout Ratio",
text: "The dividend payout ratio is the percentage of a company's profits that are paid out as dividends. A high ratio implies that the dividend payments may not be sustainable.", text: "The dividend payout ratio is the percentage of a company's profits that are paid out as dividends. A high ratio implies that the dividend payments may not be sustainable.",
}, },

View File

@ -189,11 +189,11 @@
<div> <div>
<h2 class="mb-2 px-0.5 text-xl font-bold">Valuation Ratios</h2> <h2 class="mb-2 px-0.5 text-xl font-bold">Valuation Ratios</h2>
<p class="mb-4 px-0.5 xs:text-[1.05rem] lg:leading-normal"> <p class="mb-4 px-0.5 xs:text-[1.05rem] lg:leading-normal">
The PE ratio is {rawData?.priceEarningsRatio} and the forward PE The PE ratio is {rawData?.priceToEarningsRatio} and the forward PE
ratio is {rawData?.forwardPE}. ratio is {rawData?.forwardPE}.
{rawData?.priceEarningsToGrowthRatio !== null {rawData?.priceToEarningsGrowthRatio !== null
? `${companyName}'s PEG ratio is ? `${companyName}'s PEG ratio is
${rawData?.priceEarningsToGrowthRatio}.` ${rawData?.priceToEarningsGrowthRatio}.`
: ""} : ""}
</p> </p>
@ -207,7 +207,7 @@
><span>PE Ratio</span> ><span>PE Ratio</span>
</td> </td>
<td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2" <td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2"
>{rawData?.priceEarningsRatio}</td >{rawData?.priceToEarningsRatio}</td
> >
</tr><tr </tr><tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd" class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd"
@ -247,7 +247,7 @@
><span>P/FCF Ratio</span> ><span>P/FCF Ratio</span>
</td> </td>
<td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2" <td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2"
>{rawData?.priceToFreeCashFlowsRatio}</td >{rawData?.priceToFreeCashFlowRatio}</td
> >
</tr><tr </tr><tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd" class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd"
@ -255,8 +255,8 @@
><span>PEG Ratio</span> ><span>PEG Ratio</span>
</td> </td>
<td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2" <td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2"
>{rawData?.priceEarningsToGrowthRatio !== null >{rawData?.priceToEarningsGrowthRatio !== null
? rawData?.priceEarningsToGrowthRatio ? rawData?.priceToEarningsGrowthRatio
: "n/a"}</td : "n/a"}</td
> >
</tr></tbody </tr></tbody
@ -335,7 +335,7 @@
<h2 class="mb-2 px-0.5 text-xl font-bold">Financial Position</h2> <h2 class="mb-2 px-0.5 text-xl font-bold">Financial Position</h2>
<p class="mb-4 px-0.5 xs:text-[1.05rem] lg:leading-normal"> <p class="mb-4 px-0.5 xs:text-[1.05rem] lg:leading-normal">
The company has a current ratio of {rawData?.currentRatio}, with The company has a current ratio of {rawData?.currentRatio}, with
a Debt / Equity ratio of {rawData?.debtEquityRatio}. a Debt / Equity ratio of {rawData?.debtToEquityRatio}.
</p> </p>
<table <table
class="w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800" class="w-full bg-white dark:bg-table border border-gray-300 dark:border-gray-800"
@ -363,7 +363,7 @@
><span>Debt / Equity</span> ><span>Debt / Equity</span>
</td> </td>
<td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2" <td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2"
>{rawData?.debtEquityRatio}</td >{rawData?.debtToEquityRatio}</td
> >
</tr><tr </tr><tr
class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd" class="dark:sm:hover:bg-[#245073]/10 odd:bg-[#F6F7F8] dark:odd:bg-odd"
@ -390,7 +390,7 @@
><span>Interest Coverage</span> ><span>Interest Coverage</span>
</td> </td>
<td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2" <td class="px-[5px] py-1.5 text-right xs:px-2.5 xs:py-2"
>{rawData?.interestCoverage}</td >{rawData?.interestCoverageRatio}</td
> >
</tr></tbody </tr></tbody
> >

View File

@ -119,7 +119,7 @@
{ name: "FCF Yield", rule: "freeCashFlowYield", type: "percent" }, { name: "FCF Yield", rule: "freeCashFlowYield", type: "percent" },
{ name: "Employees", rule: "employees", type: "int" }, { name: "Employees", rule: "employees", type: "int" },
{ name: "Debt Ratio", rule: "debtRatio", type: "float" }, { name: "Debt Ratio", rule: "debtRatio", type: "float" },
{ name: "Debt / Equity", rule: "debtEquityRatio", type: "int" }, { name: "Debt / Equity", rule: "debtToEquityRatio", type: "int" },
{ name: "Profit Margin", rule: "netProfitMargin", type: "percent" }, { name: "Profit Margin", rule: "netProfitMargin", type: "percent" },
{ name: "FTD Shares", rule: "failToDeliver", type: "int" }, { name: "FTD Shares", rule: "failToDeliver", type: "int" },
{ name: "Interest Income", rule: "interestIncome", type: "int" }, { name: "Interest Income", rule: "interestIncome", type: "int" },