Views
No views yet
student_data.duckdb) for instant access to 10+ years of data across 50+ NIFTY stocks, Indian indices, and global indices| File | Description |
|---|---|
pytorch_model.bin | Final trained LLM weights (TinyLLaMA-1.1B base) |
tokenizer.json | Tokenizer configuration |
config.json | Model configuration |
special_tokens_map.json | Special token mapping |
student_data.duckdb | Historical Indian financial data |
README.md | You're reading it |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained("StudentOne/Nifty50GPT-Final")
5tokenizer = AutoTokenizer.from_pretrained("StudentOne/Nifty50GPT-Final")
6tokenizer.pad_token = tokenizer.eos_token
7
8prompt = "### Instruction: What was the net_profit of INFY on 2021-03-31?\n### Output:"
9inputs = tokenizer(prompt, return_tensors="pt")
10
11outputs = model.generate(
12 **inputs,
13 max_new_tokens=100,
14 do_sample=False,
15 pad_token_id=tokenizer.pad_token_id,
16 eos_token_id=tokenizer.eos_token_id
17)
18
19print(tokenizer.decode(outputs[0]))
20
21
22
23
24###DuckDB Integration (student_data.duckdb)
25All responses from Nifty50GPT-Final are SQL-ready and designed to be run on student_data.duckdb.
26
27 How to Use It:
28Download DuckDB
29
30Launch DuckDB in terminal or PowerShell:
31
32Paste the SQL query generated by the model, for example:
33
34SELECT value FROM fundamentals
35WHERE stock_symbol = 'INFY'
36 AND metric = 'net_profit'
37 AND date = DATE '2021-03-31';
38
39
40 Works instantly. No server, no latency, no setup.
41You can extend the dataset while keeping the schema the same
42
43
44### What Can I Ask Nifty50-GPT?
45
461. Fundamental Metric Lookups
47What was the net_profit of TCS on 2022-03-31?
48Give me the EPS of INFY on 2023-03-31
49
502. All Fundamentals for a Company
51
52Give me all fundamental metrics for RELIANCE on 2021-03-31
53
543. Year-over-Year Growth
55
56What was the YoY growth of net_profit for HDFCBANK?
57
584. CAGR
59
60What was the 5-year CAGR of EPS for INFY from 2017 to 2022?
61
625. OHLCV for Stocks or Indices
63
64Give me OHLCV for ASIANPAINT on 2023-01-20
65What was the close price of NIFTY50 on 2022-12-12?
66
676. Rolling Metrics
68
69What was the 30-day moving average of close price for INFY on 2023-03-15?
70
717. NIFTY-Wide Aggregates
72
73What was the average ROE across all NIFTY50 companies in 2022?
74
75
76# Supported Stock Symbols
77# Use stock symbols, not full company names. Examples:
78
79INFY, TCS, RELIANCE, HDFCBANK, ITC, ASIANPAINT, WIPRO,
80KOTAKBANK, ADANIENT, SBIN, LT, TECHM, COALINDIA, NESTLEIND
81
82
83indian indices-
84NIFTY50, SENSEX, NSEBANK, CNXIT, CNXPHARMA,
85CNXMEDIA, CNXENERGY, CNXAUTO, CNXMETAL, CNXREALTY
86
87global indices-
88S&P 500, Nasdaq 100, Dow Jones, FTSE 100,
89DAX, Nikkei 225, Hang Seng, Shanghai Composite
90
91
92 Supported Date Format
93
94YYYY-03-31 - all yearly fundamentals have been shown to be reported on 31st of every march
95
96YYYY-MM-DD for the rest
97
98Tips to Avoid Hallucination
99Use exact stock symbols (INFY, not Infosys)
100
101Use supported metric names and date formats
102
103Follow the formats in this README for best results
104
105
106---
107
108## Legal Disclaimer
109
110This model and its associated database are provided **strictly for research, experimentation, and educational purposes** only.
111
112- **Nifty50GPT-Final does not provide financial advice.**
113- It does not guarantee accuracy, completeness, or relevance of any output.
114- It should not be used to make or inform investment decisions.
115- Outputs may be outdated, incorrect, or misinterpreted if used outside the documented prompt structure.
116- The included `student_data.duckdb` file is a static, sample database and may not reflect the most current financial data.
117
118### No Liability
119
120By using this model or dataset:
121- You acknowledge that **all responsibility lies with the user**.
122- Neither the author(s), contributors, nor affiliated organizations shall be held liable for any outcome, financial or otherwise, resulting from the use or misuse of this model or its outputs.
123
124This project is **not affiliated with the NSE, SEBI, or any regulatory or financial institution.**
125This model is **not certified**, **audited**, or**approved** by any authority.
126
127> Use responsibly. Fork freely. Trust nothing. Verify everything.
128
129
130Credits
131Created by Shubham Sood
132Maintained by Student One
133🌐 www.studentone.tech
134