AlphaNiftyAI : conquering the Indian stock market with AI
摘要
AlphaNiftyAI is a large language model (LLM) driven financial intelligence system designed to analyze Indian equities and generate actionable investment signals, and gives justification for each signal. It integrates four different sources of financial data that are price trends, company fundamentals, news sentiment, and macroeconomic context into a structured, explainable decision-making framework. AlphaNiftyAI employs a multi-agent pipeline architecture where each agent performs domain-specific summarization using the Llama3-70B model served via GROQ’s high-speed inference API. One of the key innovations in AlphaNiftyAI is the incorporation of historical news and its impact, facilitated by FAISS, which enables the retrieval of past events similar to current news headlines. These past events are related to price changes that have happened, allowing the model to ground its sentiment analysis in historical performance data. Additionally, chain-of-thought prompting is adopted in the signal generation agent to produce clear and logically justified BUY/SELL/HOLD decisions, each accompanied by an LLM-generated confidence score on a scale of 1 to 10. The framework supports both weekly and monthly decisions, generating signals for all NIFTY 50 stocks. These signals are then backtested using multiple strategies, which include market-cap-based allocation, stop loss integration, and confidence score-based selections. AlphaNiftyAI assists users by providing AI-analyzed trading signals with risk consideration strategies, enabling them to make more informed and explainable investment decisions and achieve superior risk-adjusted returns. The best-performing strategy achieved returns of 69.23% over a 15-month period and 127.80% over a 2-year period, significantly outperforming the NIFTY benchmark during both periods.