MCPcopy Create free account

hub / github.com/LuckyOne7777/LLM-Trading-Lab / functions

Functions118 in github.com/LuckyOne7777/LLM-Trading-Lab

↓ 76 callersMethodget
(self, key: str, ttl: int)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/config.py:107
↓ 11 callersFunctionassemble_path
(file_name: str)
Experiments/chatgpt_micro-cap/graphing/data_helper.py:14
↓ 10 callersFunctionsafe_float
(x)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:59
↓ 8 callersFunctiondownload_price_data
Robust OHLCV fetch with multi-stage fallbacks: Order: 1) Yahoo Finance via yfinance 2) Stooq via pandas-datareader 3) Stoo
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:400
↓ 8 callersFunctionfmt_billions
(x)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:163
↓ 7 callersFunctionfmp_endpoint
(path: str, ticker: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/fetching.py:102
↓ 7 callersFunctionload_data
(trade_log_path: str | Path = TRADE_LOG_PATH, daily_updates_path: str | Path = DAILY_PATH)
Experiments/chatgpt_micro-cap/graphing/data_helper.py:8
↓ 6 callersFunctionlast_trading_date
Return last trading date (Mon–Fri), mapping Sat/Sun -> Fri.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:213
↓ 5 callersFunctionfmt_or_na
(x: float | int | None, fmt: str)
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:1199
↓ 5 callersFunctionnormalize_ticker
(t)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:120
↓ 5 callersFunctiontrading_day_window
[start, end) window for the last trading day (Fri on weekends).
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:230
↓ 4 callersFunction_normalize_ohlcv
(df: pd.DataFrame)
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:269
↓ 4 callersFunction_to_datetime_index
(df: pd.DataFrame)
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:261
↓ 4 callersFunctionbuild_eligibility_series
Flexible overload-style wrapper. Supports: - pandas Series - list[str] - list[dict] (from `get_ipo_universe()`) - tuple[str]
Experiments/multi_model_ipo/prompt_orchestration/main_functions.py:67
↓ 4 callersFunctioncheck_weekend
Backwards-compatible wrapper returning ISO date string for last trading day.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:226
↓ 4 callersFunctionfilter_orders
( orders: dict, max_workers: int = 5, )
Experiments/multi_model_ipo/miscellaneous/order_verification.py:237
↓ 4 callersFunctionfmt_millions
(x)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:170
↓ 3 callersFunctionformat_universe_for_prompt
(companies)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:177
↓ 3 callersFunctionget_fmp_data
(ticker: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/fetching.py:118
↓ 3 callersFunctionget_ipo_universe
(lookback_years=3, max_results=25)
Experiments/multi_model_ipo/prompt_orchestration/main_functions.py:23
↓ 3 callersFunctionget_macro_news
PURE DATA LAYER ONLY. No interpretation. No sentiment. No labeling. Goal: Feed LLM raw macro + market state so it can infer
Experiments/multi_model_ipo/prompt_orchestration/main_functions.py:264
↓ 3 callersFunctionparse_date
(x)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:7
↓ 3 callersFunctionprompt_chatgpt
(text: str, model: str)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:30
↓ 3 callersFunctionprompt_claude
(text: str, model: str)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:47
↓ 3 callersFunctionprompt_deepseek
(text: str, model: str)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:9
↓ 3 callersFunctionprompt_grok
(text: str, model: str)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:67
↓ 3 callersFunctionsave_rejections
(libb: LIBBmodel, rejected_orders: list[dict])
Experiments/multi_model_ipo/miscellaneous/csv_conversion.py:19
↓ 2 callersFunction_request_json
( url: str, params: dict, api_key: str | None, max_retries: int = 3, )
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/fetching.py:16
↓ 2 callersFunction_yahoo_download
Call yfinance.download with a real UA and silence all chatter.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:294
↓ 2 callersFunctioncompute_metrics
(df: pd.DataFrame, pnl_col: str, holding_col: str)
Experiments/chatgpt_micro-cap/scripts/metrics/load_dataV3.py:86
↓ 2 callersFunctioncompute_trade_metrics
(trade_log: pd.DataFrame, exclude_atyr: bool = False)
Experiments/chatgpt_micro-cap/scripts/metrics/load_dataV3.py:121
↓ 2 callersFunctiondaily_flow
(date)
Experiments/multi_model_ipo/workflow.py:46
↓ 2 callersFunctiondownload_baseline
Download prices and normalise to a $100 baseline.
Experiments/chatgpt_micro-cap/graphing/equity_vs_baseline.py:30
↓ 2 callersFunctionfirst_nonempty
(*vals)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:77
↓ 2 callersFunctionget_market_data
(ticker: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/fetching.py:134
↓ 2 callersFunctionload_latest_portfolio_state
Load the most recent portfolio snapshot and cash balance from global PORTFOLIO_CSV. If the portfolio CSV is empty, this function will:
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:1286
↓ 2 callersFunctionlooks_like_spac
(name: str, description: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:13
↓ 2 callersFunctionlooks_shellish
(name: str, description: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:26
↓ 2 callersFunctionmain
Check versions, then run the trading script.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:1376
↓ 2 callersFunctionparse_starting_equity
Return Decimal if s represents a positive number, otherwise None.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:188
↓ 2 callersFunctionprint_results
(results: dict)
Experiments/chatgpt_micro-cap/scripts/metrics/load_dataV3.py:178
↓ 2 callersFunctionset_asof
Set a global 'as of' date so the script treats that day as 'today'. Use 'YYYY-MM-DD' format.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:47
↓ 2 callersFunctionstarting_flow
(date)
Experiments/multi_model_ipo/workflow.py:74
↓ 2 callersFunctionweekly_flow
(date)
Experiments/multi_model_ipo/workflow.py:22
↓ 1 callersFunction_calculate_market_cap
( order: dict, )
Experiments/multi_model_ipo/miscellaneous/order_verification.py:155
↓ 1 callersFunction_days_since
(value: Any, today: _dt.date)
Experiments/multi_model_ipo/miscellaneous/order_verification.py:144
↓ 1 callersFunction_effective_now
()
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:64
↓ 1 callersFunction_ensure_df
(portfolio: pd.DataFrame | dict[str, list[object]] | list[dict[str, object]])
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:478
↓ 1 callersFunction_get_ipo_date
( order: dict, )
Experiments/multi_model_ipo/miscellaneous/order_verification.py:183
↓ 1 callersFunction_get_rejection_reasons
( order: dict, )
Experiments/multi_model_ipo/miscellaneous/order_verification.py:197
↓ 1 callersFunction_init_db
()
Experiments/multi_model_ipo/miscellaneous/order_verification.py:79
↓ 1 callersFunction_log_initial_state
Log the initial global file path configuration.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:83
↓ 1 callersFunction_normalize_number_string
Remove commas/underscores/spaces and optional leading $; preserve scientific notation.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:179
↓ 1 callersFunction_parse_date
(value: Any)
Experiments/multi_model_ipo/miscellaneous/order_verification.py:102
↓ 1 callersFunction_read_json_file
Read and parse JSON from `path`. Return dict on success, None if not found or invalid. - FileNotFoundError -> return None - JSON decode error
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:101
↓ 1 callersFunction_rejected_orders_to_csv
(rejected_orders: list[dict], write_header: bool)
Experiments/multi_model_ipo/miscellaneous/csv_conversion.py:5
↓ 1 callersFunction_stooq_csv_download
Fetch OHLCV from Stooq CSV endpoint (daily). Good for US tickers and many ETFs.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:314
↓ 1 callersFunction_stooq_download
Fetch OHLCV from Stooq via pandas-datareader; returns empty DF on failure.
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:352
↓ 1 callersFunction_weekend_safe_range
Compute a concrete [start, end) window. - If explicit start/end provided: use them (add +1 day to end to make it exclusive). - If period
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:376
↓ 1 callersFunctionassemble_daily_prompt_skeleton
()
Experiments/multi_model_ipo/prompts/daily_prompt.py:296
↓ 1 callersFunctionassemble_deep_research_prompt_skeleton
()
Experiments/multi_model_ipo/prompts/deep_research_prompt.py:285
↓ 1 callersFunctionbuild_eligibility_series_from_universe
Takes the already-enriched list of companies from get_ipo_universe() and builds an eligibility report string without making any additional
Experiments/multi_model_ipo/prompt_orchestration/main_functions.py:191
↓ 1 callersFunctionbuild_fifo_lot_exits
(trade_log: pd.DataFrame, exclude_atyr: bool = False)
Experiments/chatgpt_micro-cap/scripts/metrics/load_dataV3.py:7
↓ 1 callersFunctionbuild_pure_pnl_by_ticker
(lot_exits: pd.DataFrame)
Experiments/chatgpt_micro-cap/scripts/metrics/load_dataV3.py:64
↓ 1 callersFunctioncompute_drawdown
Compute running max and drawdown (%). Return (dd_date, dd_value, dd_pct).
Experiments/chatgpt_micro-cap/graphing/max_drawdown_vs_largest_run.py:92
↓ 1 callersFunctioncompute_drawdown
Compute running max and drawdown (%). Return (dd_date, dd_value, dd_pct).
Experiments/chatgpt_micro-cap/graphing/equity_vs_baseline.py:97
↓ 1 callersFunctioncompute_fifo_holding_days
(trades_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/holding_distribution.py:4
↓ 1 callersFunctioncompute_total_logged_days_by_ticker
(daily_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/holding_chart.py:4
↓ 1 callersFunctioncreate_daily_prompt
(skeleton: str, libb: LIBBmodel)
Experiments/multi_model_ipo/prompts/prompt_assembly.py:28
↓ 1 callersFunctioncreate_deep_research_prompt
(skeleton: str, libb: LIBBmodel)
Experiments/multi_model_ipo/prompts/prompt_assembly.py:7
↓ 1 callersFunctioncreate_starting_prompt
()
Experiments/multi_model_ipo/prompts/starting_prompt.py:269
↓ 1 callersFunctiondaily_results
Print daily price updates and performance metrics (incl. CAPM).
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:1009
↓ 1 callersFunctionfind_largest_gain
Largest rise from a local minimum to the subsequent peak. Returns (start_date, end_date, gain_pct).
Experiments/chatgpt_micro-cap/graphing/max_drawdown_vs_largest_run.py:44
↓ 1 callersFunctionfind_largest_gain
Largest rise from a local minimum to the subsequent peak. Returns (start_date, end_date, gain_pct).
Experiments/chatgpt_micro-cap/graphing/equity_vs_baseline.py:49
↓ 1 callersFunctionget_ipos
(start: str, end: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/fetching.py:71
↓ 1 callersFunctionload_benchmarks
Return a list of benchmark tickers. Looks for a `tickers.json` file in either: - script_dir (if provided) OR the module SCRIPT_DIR, and the
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:124
↓ 1 callersFunctionload_portfolio_totals
Load portfolio equity history including a baseline row.
Experiments/chatgpt_micro-cap/graphing/max_drawdown_vs_largest_run.py:8
↓ 1 callersFunctionload_portfolio_totals
Load portfolio equity history including a baseline row.
Experiments/chatgpt_micro-cap/graphing/equity_vs_baseline.py:13
↓ 1 callersFunctionlog_manual_buy
( buy_price: float, shares: float, ticker: str, stoploss: float, cash: float, chatgpt_
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:807
↓ 1 callersFunctionlog_manual_sell
( sell_price: float, shares_sold: float, ticker: str, cash: float, chatgpt_portfolio: pd.D
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:917
↓ 1 callersFunctionlog_sell
( ticker: str, shares: float, price: float, cost: float, pnl: float, portfolio: pd.Dat
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:771
↓ 1 callersFunctionlooks_biotech
(name: str, description: str)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:38
↓ 1 callersFunctionmain
Generate and display the comparison graph; return metrics.
Experiments/chatgpt_micro-cap/graphing/max_drawdown_vs_largest_run.py:103
↓ 1 callersFunctionmain
Generate and display the comparison graph; return metrics.
Experiments/chatgpt_micro-cap/graphing/equity_vs_baseline.py:108
↓ 1 callersFunctionplot_daily_returns_distribution
( equity_df: pd.DataFrame, bins: int = 30 )
Experiments/chatgpt_micro-cap/graphing/daily_returns.py:4
↓ 1 callersFunctionplot_drawdown
(equity_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/drawdown.py:6
↓ 1 callersFunctionplot_holding_period_distribution
(trades_df: pd.DataFrame, bins: int = 10)
Experiments/chatgpt_micro-cap/graphing/holding_distribution.py:40
↓ 1 callersFunctionplot_repeated_ticker_exposure
(trades_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/repeated_ticker_exposure.py:5
↓ 1 callersFunctionplot_return_contribution
(trades_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/returns_by_trades.py:4
↓ 1 callersFunctionplot_top_wins_vs_losses
(trades_df: pd.DataFrame, n: int = 3)
Experiments/chatgpt_micro-cap/graphing/top_losses_vs_wins.py:5
↓ 1 callersFunctionplot_total_logged_days_by_ticker
(daily_df: pd.DataFrame)
Experiments/chatgpt_micro-cap/graphing/holding_chart.py:19
↓ 1 callersFunctionprocess_portfolio
( portfolio: pd.DataFrame | dict[str, list[object]] | list[dict[str, object]], cash: float, intera
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:490
↓ 1 callersFunctionprompt_daily_report
(skeleton, libb)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:101
↓ 1 callersFunctionprompt_deep_research
(skeleton, libb)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:85
↓ 1 callersFunctionprompt_starting_report
(prompt: str, libb: LIBBmodel)
Experiments/multi_model_ipo/prompt_orchestration/prompt_models.py:116
↓ 1 callersFunctionset_data_dir
(data_dir: Path)
Experiments/chatgpt_micro-cap/scripts/processing/trading_script.py:463
↓ 1 callersFunctiontesting_main
()
Experiments/multi_model_ipo/workflow.py:116
↓ 1 callersFunctiontruncate
(text, limit=200)
Experiments/multi_model_ipo/prompt_orchestration/main_functions.py:257
↓ 1 callersFunctiontruncate
(text, limit=200)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/utilities.py:232
Method__init__
(self, path: Path)
Experiments/multi_model_ipo/prompt_orchestration/get_prompt_data/config.py:89
next →1–100 of 118, ranked by callers