diff --git a/src/routes/stock-screener/[strategyId]/+page.svelte b/src/routes/stock-screener/[strategyId]/+page.svelte index e8a9c096..fa1d91e8 100644 --- a/src/routes/stock-screener/[strategyId]/+page.svelte +++ b/src/routes/stock-screener/[strategyId]/+page.svelte @@ -128,12 +128,12 @@ const getStockScreenerData = async (rules) => { let allRows = [ - { rule: 'avgVolume', label: 'Avg Volume', category: 'fund' }, - { rule: 'rsi', label: 'Relative Strength Index (RSI)',category: 'ta' }, - { rule: 'stochRSI', label: 'Stochastic RSI Fast',category: 'ta' }, - { rule: 'mfi', label: 'Money Flow Index',category: 'ta' }, - { rule: 'cci', label: 'Commodity Channel Index',category: 'ta' }, - { rule: 'atr', label: 'Average True Range (ATR)',category: 'ta' }, + { rule: 'avgVolume', label: 'Avg Volume', max: "50", min:"1", step:"0.5", unit: 'Mio', category: 'fund' }, + { rule: 'rsi', label: 'RSI', max: "100", min:"0", step:"2", category: 'ta' }, + { rule: 'stochRSI', label: 'Stoch RSI Fast', max: "100", min:"0", step:"2",category: 'ta' }, + { rule: 'mfi', label: 'MFI', max: "100", min:"0", step:"2", category: 'ta' }, + { rule: 'cci', label: 'CCI', max: "300", min:"-300", step:"10",category: 'ta' }, + { rule: 'atr', label: 'ATR', max: "20", min:"0", step:"0.5",category: 'ta' }, { rule: 'sma50', label: 'SMA-50', max: "500", min:"0", step:"10", category: 'ta' }, { rule: 'sma200', label: 'SMA-200', max: "500", min:"0", step:"10", category: 'ta' }, { rule: 'ema50', label: 'EMA-50', max: "500", min:"0", step:"10", category: 'ta' }, @@ -155,43 +155,42 @@ const getStockScreenerData = async (rules) => { { rule: 'growthNetIncome', label: 'Net Income Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund'}, { rule: 'grossProfit', label: 'Gross Profit', max: "800", min:"-100", step:"10", unit: 'Bn', category: 'fund'}, { rule: 'growthGrossProfit', label: 'Gross Profit Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund'}, - { rule: 'researchAndDevelopmentExpenses', label: 'Research & Development (R&D) Expenses', category: 'fund'}, + { rule: 'researchAndDevelopmentExpenses', label: 'R&D Expenses', max: "100", min:"0", step:"1", unit: 'Bn', category: 'fund'}, { rule: 'growthResearchAndDevelopmentExpenses', label: 'R&D Expenses Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund'}, - { rule: 'payoutRatio', label: 'Payout Ratio [%]',category: 'fund' }, - { rule: 'dividendYield', label: 'Dividend Yield [%]',category: 'fund' }, - { rule: 'annualDividend', label: 'Annual Dividend',category: 'fund' }, - { rule: 'dividendGrowth', label: 'Dividend Growth [%]',category: 'fund' }, + { rule: 'payoutRatio', label: 'Payout Ratio [%]', max: "100", min:"-100", step:"1", unit: '%', category: 'fund' }, + { rule: 'dividendYield', label: 'Dividend Yield [%]', max: "100", min:"0", step:"1", unit: '%',category: 'fund' }, + { rule: 'annualDividend', label: 'Annual Dividend', max: "20", min:"0", step:"0.5", category: 'fund' }, + { rule: 'dividendGrowth', label: 'Dividend Growth [%]', max: "100", min:"-100", step:"2", unit: '%',category: 'fund' }, { rule: 'eps', label: 'EPS', max: "10", min:"-10", step:"0.1", category: 'fund' }, { rule: 'growthEPS', label: 'EPS Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund' }, - { rule: 'interestIncome', label: 'Interest Income',category: 'fund' }, + { rule: 'interestIncome', label: 'Interest Income', max: "800", min:"-100", step:"10", unit: 'Bn', category: 'fund' }, { rule: 'interestExpense', label: 'Interest Expenses', category: 'fund' }, { rule: 'growthInterestExpense', label: 'Interest Expenses Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund' }, - { rule: 'operatingExpenses', label: 'Operating Expenses',category: 'fund' }, + { rule: 'operatingExpenses', label: 'Operating Expenses', max: "800", min:"-100", step:"10", unit: 'Bn', category: 'fund' }, { rule: 'growthOperatingExpenses', label: 'Operating Expenses Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund' }, - { rule: 'operatingIncome', label: 'Operating Income',category: 'fund' }, + { rule: 'operatingIncome', label: 'Operating Income', max: "800", min:"-100", step:"10", unit: 'Bn', category: 'fund' }, { rule: 'growthOperatingIncome', label: 'Operating Income Growth [%]', max: "200", min:"-100", step:"2", unit: '%',category: 'fund' }, - { rule: 'pe', label: 'Price per Earnings (PE)', category: 'fund'}, - { rule: 'forwardPE', label: 'Forward PE', category: 'fund'}, - { rule: 'priceToBookRatio', label: 'Price to Book Ratio (PB)', category: 'fund'}, - { rule: 'priceToSalesRatio', label: 'Price to Sales Ratio (PS)', category: 'fund'}, - { rule: 'beta', label: 'Beta', category: 'fund'}, - { rule: 'ebitda', label: 'Earnings Before Interests, Taxes, Depreciation & Amortisation (EBITDA)', category: 'fund'}, + { rule: 'pe', label: 'P/E', max: "50", min:"0", step:"0.5",category: 'fund'}, + { rule: 'forwardPE', label: 'Forward PE', max: "100", min:"-100", step:"2", category: 'fund'}, + { rule: 'priceToBookRatio', label: 'P/B', max: "50", min:"0", step:"0.5", category: 'fund'}, + { rule: 'priceToSalesRatio', label: 'P/S', max: "50", min:"0", step:"0.5", category: 'fund'}, + { rule: 'beta', label: 'Beta', max: "10", min:"-10", step:"0.1", category: 'fund'}, + { rule: 'ebitda', label: 'EBITDA', max: "800", min:"-100", step:"10", unit: 'Bn', category: 'fund'}, { rule: 'growthEBITDA', label: 'EBITDA Growth [%]', max: "200", min:"-100", step:"2", unit: '%', category: 'fund'}, - { rule: 'var', label: 'Value at Risk (VaR)', category: 'fund' }, - { rule: 'trendAnalysis', label: 'AI Trend Analysis (Bullish)', category: 'ai' }, - { rule: 'fundamentalAnalysis', label: 'AI Fundamental Analysis (Bullish)', category: 'ai' }, - { rule: 'ratingRecommendation', label: 'Analyst Rating', category: 'fund'}, - { rule: 'currentRatio', label: 'Current Ratio',category: 'fund' }, - { rule: 'quickRatio', label: 'Quick Ratio',category: 'fund' }, - { rule: 'debtEquityRatio', label: 'Debt / Equity',category: 'fund' }, - { rule: 'debtRatio', label: 'Debt Ratio',category: 'fund' }, - { rule: 'returnOnAssets', label: 'Return on Assets',category: 'fund' }, - { rule: 'returnOnEquity', label: 'Return on Equity',category: 'fund' }, + { rule: 'var', label: 'VaR', max: "0", min:"-20", step:"1", unit: '%', category: 'fund' }, + { rule: 'trendAnalysis', label: 'AI Trend Analysis (Bullish)', max: "100", min:"0", step:"0.5", unit: '%', category: 'ai' }, + { rule: 'fundamentalAnalysis', label: 'AI Fundamental Analysis (Bullish)', max: "100", min:"0", step:"0.5", unit: '%', category: 'ai' }, + //{ rule: 'ratingRecommendation', label: 'Analyst Rating', max: "2", min:"0", step:"1", category: 'fund'}, + { rule: 'currentRatio', label: 'Current Ratio', max: "50", min:"0", step:"0.5", category: 'fund' }, + { rule: 'quickRatio', label: 'Quick Ratio', max: "50", min:"0", step:"0.5", category: 'fund' }, + { rule: 'debtEquityRatio', label: 'Debt / Equity', max: "50", min:"0", step:"0.5",category: 'fund' }, + { rule: 'debtRatio', label: 'Debt Ratio', max: "50", min:"0", step:"0.5", category: 'fund' }, + { rule: 'returnOnAssets', label: 'Return on Assets', max: "5", min:"-5", step:"0.1", category: 'fund' }, + { rule: 'returnOnEquity', label: 'Return on Equity', max: "5", min:"-5", step:"0.1",category: 'fund' }, { rule: 'enterpriseValue', label: 'Enterprise Value', max: "800", min:"10", step:"10", unit: 'Bn', category: 'fund' }, { rule: 'freeCashFlowPerShare', label: 'FCF / Share', max: "20", min:"-20", step:"0.5",category: 'fund' }, { rule: 'cashPerShare', label: 'Cash / Share', max: "50", min:"-50", step:"1", category: 'fund' }, { rule: 'priceToFreeCashFlowsRatio', label: 'Price / FCF', max: "100", min:"-100", step:"2", category: 'fund' }, - ]; // Creating the ruleMappings object from allRows @@ -429,10 +428,16 @@ const conditions = { var: ruleCondition.var, trendAnalysis: ruleCondition.trendAnalysis, fundamentalAnalysis: ruleCondition.fundamentalAnalysis, + dividendGrowth: ruleCondition.dividendGrowth, + dividendYield: ruleCondition.dividendYield, + payoutRatio: ruleCondition.payoutRatio, + annualDividend: ruleCondition.annualDividend, currentRatio: ruleCondition.currentRatio, quickRatio: ruleCondition.quickRatio, debtEquityRatio: ruleCondition.debtEquityRatio, debtRatio: ruleCondition.debtRatio, + returnOnAssets: ruleCondition.returnOnAssets, + returnOnEquity: ruleCondition.returnOnEquity, enterpriseValue: ruleCondition.enterpriseValue, freeCashFlowPerShare: ruleCondition.freeCashFlowPerShare, cashPerShare: ruleCondition.cashPerShare, @@ -863,7 +868,7 @@ function handleChangeValue(event) { // If you need to keep the separate variables in sync: switch (rule) { case 'payoutRatio': - valuePayoutRatio; + valuePayoutRatio = value; break; case 'dividendGrowth': valueDividendGrowth = value; @@ -902,7 +907,7 @@ function handleChangeValue(event) { valueInterestIncome = value; break; case 'ratingRecommendation': - valueAnalyst //ruleTrend[ruleName] = value; + valueAnalyst = value; break; case 'revenue': valueRevenue = value; @@ -1139,795 +1144,25 @@ function handleChangeValue(event) {