Finance
FinanceAgentToolSpec #
Bases: BaseToolSpec
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
find_similar_companies #
find_similar_companies(symbol: str) -> List[str]
Given a stock's ticker symbol, returns a list of similar companies.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
42 43 44 |
|
get_earnings_history #
get_earnings_history(symbol: str) -> DataFrame
Given a stock's ticker symbol, returns a dataframe storing actual and estimated earnings over past K quarterly reports.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
46 47 48 |
|
get_latest_earning_estimate #
get_latest_earning_estimate(symbol: str) -> float
Given a stock's ticker symbol, returns it's earnings estimate for the upcoming quarterly report.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
50 51 52 |
|
get_stocks_with_upcoming_earnings #
get_stocks_with_upcoming_earnings(num_days_from_now: int, only_sp500: bool) -> DataFrame
Returns a pandas dataframe containing all stocks which are announcing earnings in upcoming days.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_days_from_now
|
int
|
only returns stocks which announcing earnings from today's date to num_days_from_now. |
required |
only_sp500
|
bool
|
only returns sp500 stocks. |
required |
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
get_current_gainer_stocks #
get_current_gainer_stocks() -> DataFrame
Return US stocks which are classified as day gainers as per Yahoo Finance.
A US stock is classified as day gainer if %change in price > 3, price >=5, volume > 15_000
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
74 75 76 77 78 79 80 |
|
get_current_loser_stocks #
get_current_loser_stocks() -> DataFrame
Returns US stocks which are classified as day losers as per Yahoo Finance.
A US stock is classified as day loser if %change in price < -2.5, price >=5, volume > 20_000
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
82 83 84 85 86 87 88 |
|
get_current_undervalued_growth_stocks #
get_current_undervalued_growth_stocks() -> DataFrame
Get list of undervalued growth stocks in US market as per Yahoo Finance.
A stock with Price to Earnings ratio between 0-20, Price / Earnings to Growth < 1
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
90 91 92 93 94 95 96 |
|
get_current_technology_growth_stocks #
get_current_technology_growth_stocks() -> DataFrame
Returns a data frame of growth stocks in technology sector in US market.
If a stocks's quarterly revenue growth YoY% > 25%.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
98 99 100 101 102 103 104 |
|
get_current_most_traded_stocks #
get_current_most_traded_stocks() -> DataFrame
Returns a dataframe storing stocks which were traded the most in current market.
Stocks are ordered in decreasing order of activity i.e stock traded the most on top.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
106 107 108 109 110 111 112 |
|
get_current_undervalued_large_cap_stocks #
get_current_undervalued_large_cap_stocks() -> DataFrame
Returns a dataframe storing US market large cap stocks with P/E < 20.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
114 115 116 |
|
get_current_aggressive_small_cap_stocks #
get_current_aggressive_small_cap_stocks() -> DataFrame
Returns a dataframe storing US market small cap stocks with 1 yr % change in earnings per share > 25.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
118 119 120 |
|
get_trending_finance_news #
get_trending_finance_news() -> List[str]
Returns a list of top 10 trending news in financial market as per seekingalpha.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
122 123 124 125 |
|
get_google_trending_searches #
get_google_trending_searches() -> Optional[DataFrame]
Returns trending searches in US as per google trends.
If unable to find any trends, returns None.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
127 128 129 130 131 132 133 |
|
get_google_trends_for_query #
get_google_trends_for_query(query: str) -> Optional[DataFrame]
Finds google search trends for a given query in United States.
Returns None if unable to find any trends.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
135 136 137 138 139 140 141 |
|
get_latest_news_for_stock #
get_latest_news_for_stock(stock_id: str) -> List[str]
Given a stock_id representing the name of a company or the stock ticker symbol, Returns a list of news published related to top business articles in US in last 7 days from now.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
143 144 145 146 |
|
get_current_stock_price_info #
get_current_stock_price_info(stock_ticker_symbol: str) -> Optional[Dict[str, Any]]
Given a stock's ticker symbol, returns current price information of the stock.
Returns None if the provided stock ticker symbol is invalid.
Source code in llama-index-integrations/tools/llama-index-tools-finance/llama_index/tools/finance/base.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|