MCPcopy Create free account

hub / github.com/AgriQuantAI/AgriQuant-AI / functions

Functions214 in github.com/AgriQuantAI/AgriQuant-AI

↓ 8 callersMethodpredict
Make price prediction using trained model Args: recent_data: Recent historical data (at least sequence_length ro
lstm_predictor.py:325
↓ 6 callersMethodanalyze_freeze_event
Analyze freeze forecast and generate crop damage prediction Args: forecast_data: Weather forecast from NOAA
claude_engine.py:52
↓ 4 callersMethodshutdown
Graceful shutdown
main.py:56
↓ 3 callersMethodcalculate_liquidity_metrics
Calculate market liquidity metrics Returns: Comprehensive liquidity analysis
microstructure_analyzer.py:119
↓ 2 callersMethod_get_gfs_fallback
Fallback to NOAA GFS model data when INMET is unavailable. GFS provides global coverage including Brazil with 0.25deg resolution.
coffee_brazil_collector.py:126
↓ 2 callersMethodcalculate_metrics
Calculate performance metrics Args: days: Calculate for last N days (None = all time) Retur
performance_tracker.py:84
↓ 2 callersMethodconnect
Establish database connection
database.py:27
↓ 2 callersMethodfetch_usda_crop_progress
Weekly USDA Crop Progress report. Released every Monday during growing season. Good/Excellent % is the single most market-mov
icco_usda_scraper.py:70
↓ 2 callersMethodfit_garch_11
Fit GARCH(1,1) model to returns Args: returns: Returns series initial_params: Initial parameter gues
volatility_forecaster.py:130
↓ 2 callersMethodget_state_forecast
NOAA forecast for a grain production state centroid
grains_collector.py:90
↓ 2 callersMethodget_usda_crop_progress
Fetch weekly USDA Crop Progress ratings. Good/Excellent % is the most-watched ag data point each Monday. Drop of 5+ points we
grains_collector.py:195
↓ 2 callersMethodmonitor_weather_all_counties
Main monitoring loop - check all counties for weather threats
main.py:62
↓ 2 callersMethodnormalize_data
Normalize sequences and targets Args: sequences: Input sequences targets: Target values
lstm_predictor.py:183
↓ 2 callersMethodprepare_sequences
Convert time series data into sequences for LSTM Args: data: DataFrame with features and target targ
lstm_predictor.py:151
↓ 1 callersMethod__init__
(self, sequences: np.ndarray, targets: np.ndarray)
lstm_predictor.py:29
↓ 1 callersMethod_aggregate_drought_risk
Weight drought risks by production share
coffee_brazil_collector.py:300
↓ 1 callersMethod_aggregate_frost_risk
Weight frost risks by production share
coffee_brazil_collector.py:287
↓ 1 callersMethod_apply_correlation_adjustments
Adjust signal confidence based on cross-commodity correlations. If Coffee AND Cocoa both show LONG signals, it suggests a shared
multi_commodity_engine.py:113
↓ 1 callersMethod_assess_portfolio_risk
Assess overall portfolio risk across all positions. Prevents over-concentration in correlated weather events.
multi_commodity_engine.py:145
↓ 1 callersMethod_calculate_confidence_calibration
Check if confidence scores are well-calibrated E.g., if AI says 80% confident, are 80% of those predictions accurate?
backtest.py:316
↓ 1 callersMethod_calculate_max_drawdown
Calculate maximum drawdown percentage
performance_tracker.py:157
↓ 1 callersMethod_calculate_summary_statistics
Calculate aggregate metrics
backtest.py:289
↓ 1 callersMethod_create_alert
Create high-priority alert for significant predictions
main.py:201
↓ 1 callersMethod_display_results
Display backtest results
backtest.py:344
↓ 1 callersMethod_extract_signals
Extract trading signals from each commodity's data
multi_commodity_engine.py:100
↓ 1 callersMethod_find_historical_analogs
Find historical frost events with similar temperature profiles
coffee_brazil_collector.py:243
↓ 1 callersMethod_find_historical_precedents
Find similar historical events
market_impact_analyzer.py:156
↓ 1 callersMethod_find_similar_freeze_events
Find historical freeze events with similar conditions
risk_analyzer.py:464
↓ 1 callersMethod_format_alert_message
Format human-readable alert message
main.py:225
↓ 1 callersMethod_generate_and_store_prediction
Generate AI prediction and store in database
main.py:145
↓ 1 callersMethod_generate_trade_recommendations
Generate ranked trade recommendations with position sizing. Applies risk management rules from config.
multi_commodity_engine.py:199
↓ 1 callersMethod_load_historical_database
Load historical weather events database
risk_analyzer.py:481
↓ 1 callersMethod_load_trades
Load trade history from database
performance_tracker.py:26
↓ 1 callersMethod_load_wallet
Load distribution wallet from environment
investor_distribution.py:37
↓ 1 callersMethod_load_wallet
Load wallet from environment variable
crypto_fundraise.py:34
↓ 1 callersMethod_record_airdrop
Record airdrop in database for transparency
investor_distribution.py:191
↓ 1 callersMethod_record_buyback
Record buyback in database for transparency
crypto_fundraise.py:131
↓ 1 callersMethod_save_trades
Save trades to database
performance_tracker.py:79
↓ 1 callersMethod_send_alert
Send alert via configured channels In production: email, SMS, Slack, webhook
main.py:248
↓ 1 callersMethodanalyze_hurricane_threat
Analyze hurricane threat and predict crop impact
claude_engine.py:215
↓ 1 callersMethodassess_brazil_drought
Drought assessment for Brazil Center-South sugarcane
sugar_collector.py:101
↓ 1 callersMethodassess_corn_stress
Corn yield stress assessment. Critical periods: - Pollination (July): Heat > 95F or drought = yield loss - Grain fill (Aug):
grains_collector.py:111
↓ 1 callersMethodassess_drought_risk
Assess drought risk - critical during flowering (Oct-Dec) and fruit development (Jan-Mar). El Nino years increase risk significantly.
coffee_brazil_collector.py:206
↓ 1 callersMethodassess_drought_risk
Drought assessment for cocoa. Cocoa requires 1200-2500mm annual rainfall. Critical periods: flowering (Oct-Nov) and pod devel
cocoa_westafrica_collector.py:177
↓ 1 callersMethodassess_freeze_risk
Assess crop damage risk from freeze event Based on: - Temperature thresholds (28°F = critical, 26°F = severe)
risk_analyzer.py:158
↓ 1 callersMethodassess_frost_risk
Assess frost risk for a Brazilian coffee region. Frost below 0C causes leaf damage; below -2C causes branch kill; below -4C c
coffee_brazil_collector.py:159
↓ 1 callersMethodassess_harmattan_risk
Harmattan: hot, dry, dusty wind from Sahara (Nov-Feb). Causes: pod dehydration, flower drop, reduced pod set. Severe Harmatta
cocoa_westafrica_collector.py:122
↓ 1 callersMethodassess_india_monsoon
India monsoon assessment. June-September rainfall vs normal. IMD defines: >110% = excess, 90-110% = normal, 75-90% = deficient,
sugar_collector.py:73
↓ 1 callersMethodassess_wheat_risk
Wheat risk assessment. HRW wheat: winterkill risk (Jan-Feb), drought at heading (Apr-May), heat at grain fill (May-Jun).
grains_collector.py:159
↓ 1 callersMethodcalculate_buyback_amount
Calculate 50% of monthly profits for buyback Args: monthly_profits_usdc: Total monthly trading profits in USDC
crypto_fundraise.py:41
↓ 1 callersMethodcalculate_garman_klass_volatility
Garman-Klass volatility estimator Most efficient estimator using OHLC data Args: open_prices: Opening pr
volatility_forecaster.py:304
↓ 1 callersMethodcalculate_holder_allocations
Calculate USDT allocation for each holder based on token percentage Args: total_usdt: Total USDT to distribute
investor_distribution.py:79
↓ 1 callersMethodcalculate_ndvi
Calculate Normalized Difference Vegetation Index NDVI = (NIR - Red) / (NIR + Red) Values: 0.8-1.0:
satellite_data_processor.py:49
↓ 1 callersMethodcalculate_order_flow_imbalance
Calculate order flow imbalance over recent period Args: window_minutes: Time window for calculation
microstructure_analyzer.py:66
↓ 1 callersMethodcalculate_parkinson_volatility
Parkinson volatility estimator (uses high-low range) More efficient than close-to-close for range data Args:
volatility_forecaster.py:282
↓ 1 callersMethodcalculate_quarterly_distribution
Calculate 50% of quarterly profits for USDT airdrop Args: quarterly_profits_usdc: Total quarterly trading profit
investor_distribution.py:44
↓ 1 callersMethodcalculate_realized_volatility
Calculate realized volatility from returns Args: returns: Array of returns window: Rolling window si
volatility_forecaster.py:40
↓ 1 callersMethodcalculate_rolling_correlation
Calculate rolling correlation between two series Args: series1: First time series series2: Second ti
correlation_analyzer.py:30
↓ 1 callersMethodcalculate_vulnerability_multiplier
Calculate how current grove health affects vulnerability Returns multiplier (1.0 = normal, >1.0 = more vulnerable)
risk_analyzer.py:64
↓ 1 callersMethodcalculate_water_stress_index
Calculate Normalized Difference Water Index (NDWI) NDWI = (NIR - SWIR) / (NIR + SWIR) High values: High veg
satellite_data_processor.py:77
↓ 1 callersMethodclassify_enso_phase
Classify current ENSO phase from ONI value
el_nino_monitor.py:101
↓ 1 callersMethodcollect_all_regions
Collect all sugar production region data
sugar_collector.py:126
↓ 1 callersMethodcreate_tables
Create all necessary tables
database.py:45
↓ 1 callersFunctiondemo_ai_analysis
Demo: Generate AI prediction using Claude Sonnet 4
demo.py:63
↓ 1 callersFunctiondemo_complete_workflow
Run complete demo workflow
demo.py:251
↓ 1 callersFunctiondemo_database_storage
Demo: Store data in database
demo.py:170
↓ 1 callersFunctiondemo_performance_tracking
Demo: Show how performance is tracked
demo.py:208
↓ 1 callersFunctiondemo_weather_collection
Demo: Collect real weather data from NOAA
demo.py:15
↓ 1 callersMethoddetect_canopy_coverage
Calculate percentage of grove area with healthy canopy Args: ndvi: NDVI array threshold: Minimum NDV
satellite_data_processor.py:98
↓ 1 callersMethoddetect_volatility_regime
Detect current volatility regime Args: current_volatility: Current volatility level historical_volat
volatility_forecaster.py:235
↓ 1 callersMethoddisconnect
Close database connection
database.py:37
↓ 1 callersMethodensemble_volatility_forecast
Combine multiple volatility models for robust forecast Args: returns: Returns series high_prices: Hi
volatility_forecaster.py:332
↓ 1 callersMethodestimate_price_impact
Estimate price impact of a trade Args: order_size: Size of hypothetical order direction: 'buy' or 's
microstructure_analyzer.py:168
↓ 1 callersMethodevaluate_prediction
Compare prediction to actual outcome
backtest.py:166
↓ 1 callersMethodewma_volatility
EWMA (Exponentially Weighted Moving Average) volatility Args: returns: Returns series lambda_param:
volatility_forecaster.py:63
↓ 1 callersMethodexecute_airdrop
Execute quarterly USDT airdrop to all holders Args: total_usdt: Total USDT to distribute dry_run: If
investor_distribution.py:110
↓ 1 callersMethodexecute_buyback
Execute token buyback and burn Args: usdc_amount: Amount of USDC to use for buyback dry_run: If True
crypto_fundraise.py:82
↓ 1 callersMethodexplain_prediction_to_user
Generate human-readable explanation of prediction
claude_engine.py:453
↓ 1 callersMethodextract_features
Extract comprehensive feature set for prediction Args: weather_data: Current and forecasted weather conditions
ensemble_predictor.py:54
↓ 1 callersMethodfetch_conab_coffee_estimate
CONAB (Brazil's national supply agency) monthly coffee crop estimates. CONAB revisions often move KC 2-5% on release day.
icco_usda_scraper.py:112
↓ 1 callersMethodfetch_icco_supply_data
ICCO quarterly supply/demand data for cocoa. Deficit/surplus estimate is the primary CC price driver. 2023-24 saw record defi
icco_usda_scraper.py:131
↓ 1 callersMethodfetch_usda_wasde
Fetch latest USDA WASDE (World Agricultural Supply and Demand Estimates). Published monthly. Contains S&D estimates for all grain and
icco_usda_scraper.py:52
↓ 1 callersMethodforecast_garch_volatility
Forecast volatility using fitted GARCH model Args: last_return: Most recent return last_variance: Mo
volatility_forecaster.py:192
↓ 1 callersMethodforecast_price_impact
Forecast price impact from supply disruption Args: supply_disruption_pct: Expected supply reduction (0.10 = 10%)
market_impact_analyzer.py:52
↓ 1 callersMethodgenerate_monthly_report
Generate comprehensive monthly report Args: year: Year (e.g., 2026) month: Month (1-12)
performance_tracker.py:185
↓ 1 callersMethodgenerate_performance_report
Generate comprehensive performance metrics
main.py:293
↓ 1 callersMethodgenerate_prediction
Generate AI prediction based on simulated forecast
backtest.py:126
↓ 1 callersMethodgenerate_risk_report
Generate formatted risk report
risk_analyzer.py:498
↓ 1 callersMethodgenerate_trading_recommendation
Generate specific trading recommendation Returns entry, exit, stop loss levels
market_impact_analyzer.py:250
↓ 1 callersMethodget_brazil_sugarcane_forecast
GFS forecast for Sao Paulo sugarcane belt
sugar_collector.py:58
↓ 1 callersMethodget_commodity_signals
Generate commodity trading signals based on ENSO phase. These are medium-term (3-6 month) directional biases.
el_nino_monitor.py:114
↓ 1 callersMethodget_enso_forecast
Fetch ENSO probability forecast from IRI (International Research Institute for Climate and Society). 9-month ahead probabilities.
el_nino_monitor.py:84
↓ 1 callersMethodget_execution_quality_score
Calculate overall execution quality score (0-100) Higher = better execution environment Returns: Executi
microstructure_analyzer.py:355
↓ 1 callersMethodget_ghana_met_forecast
Fetch from Ghana Meteorological Agency. Falls back to NOAA GFS for Ivory Coast where direct API unavailable.
cocoa_westafrica_collector.py:93
↓ 1 callersMethodget_historical_analogs
Find historical events similar to current conditions
database.py:241
↓ 1 callersMethodget_inmet_forecast
Fetch forecast from INMET (Instituto Nacional de Meteorologia) Brazil's national meteorological service
coffee_brazil_collector.py:96
↓ 1 callersMethodget_modis_ndvi
Fetch MODIS MOD13Q1 NDVI — free, 250m, 16-day composite. Primary free satellite layer for vegetation health monitoring.
satellite_ndvi_processor.py:118
↓ 1 callersMethodget_ndvi_vegetation_index
Fetch MODIS NDVI data for canopy health assessment. NDVI below 0.4 indicates significant vegetation stress. Used as leading i
cocoa_westafrica_collector.py:218
↓ 1 callersMethodget_next_distribution_date
Calculate next scheduled distribution date
investor_distribution.py:200
↓ 1 callersMethodget_oni_index
Fetch current ONI (Oceanic Nino Index) from NOAA CPC. This is the definitive ENSO indicator.
el_nino_monitor.py:62
next →1–100 of 214, ranked by callers