### Complete PyFedWatch Workflow Example Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Demonstrates the full workflow from data loading to generating rate expectations, including all intermediate steps. This example requires setting up FOMC dates, Fed Funds rate history, and creating a FedWatch instance. ```python import pyfedwatch as fw from pyfedwatch.datareader import ( read_price_history, get_fomc_data, get_fedfunds_range ) # Step 1: Get FOMC meeting dates fomc_data = get_fomc_data() fomc_dates = fomc_data[ (fomc_data['Status'] == 'Scheduled') | (fomc_data['Status'] == 'Cancelled') ].index.tolist() # Step 2: Get Fed Funds target rate history (optional, for reference) ff_range = get_fedfunds_range() # Step 3: Create FedWatch instance fedwatch = fw.fedwatch.FedWatch( watch_date='2023-03-10', fomc_dates=fomc_dates, num_upcoming=9, user_func=read_price_history, path='./data/contracts' ) ``` ```python # Step 4: Generate binary hike information (intermediate step) binary_hike_info = fedwatch.generate_binary_hike_info() print("Binary Hike Info:") print(binary_hike_info[['Meeting', 'Pstart', 'Pavg', 'Pend', 'Change', 'H0', 'H1', 'P0', 'P1']]) ``` ```python # Step 5: Generate final rate expectations rate_expectations = fedwatch.generate_hike_info(rate_cols=True) ``` ```python # Step 6: Format and display results styled_df = rate_expectations.style.format("{:.1%}").background_gradient(axis=1) print("\nRate Expectations (probabilities):") print(rate_expectations.to_string()) ``` ```python # Step 7: Access FOMC calendar data fomc_summary = fedwatch.fomc_data.summary print("\nFOMC Calendar Summary:") print(fomc_summary) ``` ```python # Step 8: Plot FOMC calendar fig = fedwatch.fomc_data.plot_fomc_calendar() fig.savefig('fomc_calendar.png', bbox_inches='tight', dpi=150) ``` -------------------------------- ### Install PyFedWatch using pip Source: https://github.com/arahimiquant/pyfedwatch/blob/master/README.md Install the PyFedWatch package using pip. This command downloads and installs the latest version of the package and its dependencies. ```bash pip install pyfedwatch ``` -------------------------------- ### Get FOMC Meeting Data Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Retrieve FOMC meeting data. Option 1 uses `read_fomc_data` which requires a path to local data. Option 2, `get_fomc_data`, is recommended as it fetches data directly and allows filtering for scheduled or cancelled meetings. ```python # Get FOMC meetings data # Option 1: Use read_fomc_data and create a list fomc_data_1 = read_fomc_data(path = '../data/fomc') fomc_dates_1 = fomc_data_1['FOMCDate'].to_list() ``` ```python # Option 2: (Recommended) Use get_fomc_data and create a list fomc_data_2 = get_fomc_data() fomc_dates_2 = fomc_data_2[(fomc_data_2['Status'] == 'Scheduled') | (fomc_data_2['Status'] == 'Cancelled')].index.tolist() ``` -------------------------------- ### Get Fed Funds Target Rate for a Specific Date Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Access the Federal Funds target rate (lower and upper limits) for a specific date from the retrieved `ff_range` DataFrame. ```python # Get target rate for a specific date target_date = '2023-03-10' rate_on_date = ff_range.loc[target_date] print(f"Lower Limit: {rate_on_date['LL']}%, Upper Limit: {rate_on_date['UL']}%") # Output: Lower Limit: 4.5%, Upper Limit: 4.75% ``` -------------------------------- ### Get Fed Funds Target Rate Range Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Retrieve the historical upper and lower limits for the Fed Funds target rate using `get_fedfunds_range`. The result is a pandas DataFrame indexed by date. ```python # Get Fed Funds target rate upper and lower limits ff_range = get_fedfunds_range() ff_range ``` -------------------------------- ### Initialize FedWatch with Custom Data Reader Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Shows how to create a `FedWatch` instance, providing a custom `user_func` for reading price history and specifying additional arguments for the function. It also demonstrates generating rate expectations with and without target rate columns. ```python import pyfedwatch as fw from pyfedwatch.datareader import read_price_history, get_fomc_data # Get FOMC dates fomc_data = get_fomc_data() fomc_dates = fomc_data[ (fomc_data['Status'] == 'Scheduled') | (fomc_data['Status'] == 'Cancelled') ].index.tolist() # Create FedWatch instance with custom data reader function # The user_func must accept 'symbol' as its first argument and return # a DataFrame with 'Date' (as index or column) and 'Close' column fedwatch = fw.fedwatch.FedWatch( watch_date='2023-03-10', fomc_dates=fomc_dates, num_upcoming=9, user_func=read_price_history, # Your data reader function path='./data/contracts' # Additional kwargs passed to user_func ) # Generate rate expectations with target rate columns rate_expectations = fedwatch.generate_hike_info(rate_cols=True) print(rate_expectations) # Output: DataFrame with FOMC dates as index and target rate ranges as columns # 4.50-4.75 4.75-5.00 5.00-5.25 5.25-5.50 ... # WatchDate FOMCDate # 2023-03-10 2023-03-22 0.0 0.222 0.778 0.000 ... # 2023-05-03 0.0 0.038 0.456 0.506 ... # 2023-06-14 0.0 0.017 0.297 0.480 ... # Generate with basis point changes instead of rate columns rate_expectations_bp = fedwatch.generate_hike_info(rate_cols=False) # Provide watch date rate range manually (if FRED unavailable) rate_expectations = fedwatch.generate_hike_info( rate_cols=True, watch_rate_range=(4.50, 4.75) # (lower_limit, upper_limit) ) ``` -------------------------------- ### Initialize FOMC Calendar and View Summary Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Demonstrates how to fetch FOMC meeting dates, filter them, and initialize the `FOMC` class. It also shows how to access the summary DataFrame and individual lists of months, contracts, and meetings. ```python import pyfedwatch as fw from pyfedwatch.datareader import get_fomc_data # Get FOMC meeting dates from Federal Reserve website and FRASER database fomc_data = get_fomc_data() # Filter for scheduled or cancelled meetings (exclude notation votes) fomc_dates = fomc_data[ (fomc_data['Status'] == 'Scheduled') | (fomc_data['Status'] == 'Cancelled') ].index.tolist() # Create FOMC calendar for 9 upcoming meetings from March 10, 2023 fomc = fw.fomc.FOMC( watch_date='2023-03-10', fomc_dates=fomc_dates, num_upcoming=9 ) # View the summary DataFrame with contracts, meetings, and order print(fomc.summary) # Output: # Contract Meeting Order # YYYY-MM # 2023-01 ZQF23 No FOMC 0 # 2023-02 ZQG23 2023-02-01 -1 # 2023-03 ZQH23 2023-03-22 1 # 2023-05 ZQK23 2023-05-03 2 # 2023-06 ZQM23 2023-06-14 3 # ... # Access individual components print(fomc.month_list) # ['2023-01', '2023-02', '2023-03', ...] print(fomc.contract_list) # ['ZQF23', 'ZQG23', 'ZQH23', ...] print(fomc.meeting_list) # ['No FOMC', '2023-02-01', '2023-03-22', ...] # Plot the FOMC calendar visualization # Blue boxes = FOMC meeting days, Red box = watch date fig = fomc.plot_fomc_calendar() fig.savefig('fomc_calendar.png', bbox_inches='tight', dpi=150) ``` -------------------------------- ### FedWatch Initialization and Data Access Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Demonstrates how to initialize the FedWatch class with custom data readers and access summary data. ```APIDOC ## FedWatch Class Initialization and Data Access ### Description This section covers accessing summary data from the FedWatch object and initializing the class with custom data reading functions. ### Accessing Summary Data ```python # Access intermediate data print(fedwatch.fomc_data.summary) # Full summary with price data print(fedwatch.watch_rate_range) # Current target rate range ``` ### Custom Data Reader Function The FedWatch class requires a user-provided function to read fed funds futures pricing data. This function must accept `symbol` as its first argument and return a pandas DataFrame with a `Date` column (or index) and a `Close` column containing the settlement prices. **Required DataFrame format:** - Index: `Date` (datetime) - Columns: Must include `Close` (float) **Example DataFrame output:** ``` Open High Low Close Volume Date 2023-01-03 95.125 95.130 95.120 95.125 1000 2023-01-04 95.130 95.135 95.125 95.130 1500 ``` **Example Custom Data Reader Functions:** **1. Read from Excel files:** ```python import pandas as pd def read_from_excel(symbol: str, path: str) -> pd.DataFrame: """Read pricing data from Excel files.""" return pd.read_excel(f'{path}/{symbol}.xlsx', index_col=0) ``` **2. Read from CSV files:** ```python import pandas as pd def read_from_csv(symbol: str, data_dir: str) -> pd.DataFrame: """Read pricing data from CSV files.""" df = pd.read_csv(f'{data_dir}/{symbol}.csv') df['Date'] = pd.to_datetime(df['Date']) df.set_index('Date', inplace=True) return df ``` **3. Fetch from API (hypothetical):** ```python import pandas as pd import requests def read_from_api(symbol: str, api_key: str, base_url: str) -> pd.DataFrame: """Fetch pricing data from a REST API.""" response = requests.get( f'{base_url}/futures/{symbol}', headers={'Authorization': f'Bearer {api_key}'} ) data = response.json() df = pd.DataFrame(data['prices']) df['Date'] = pd.to_datetime(df['date']) df.set_index('Date', inplace=True) df.rename(columns={'close': 'Close'}, inplace=True) return df[['Close']] ``` ### Using Custom Function with FedWatch ```python import pyfedwatch as fw # Assuming fomc_dates is defined elsewhere fomc_dates = [...] fedwatch = fw.fedwatch.FedWatch( watch_date='2023-03-10', fomc_dates=fomc_dates, num_upcoming=9, user_func=read_from_excel, # Your custom function path='./data/contracts' # Passed as **kwargs to user_func ) ``` ``` -------------------------------- ### Initialize FedWatch with Custom Data Reader Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Initialize the FedWatch class with a custom user-provided function for reading pricing data. The 'path' argument is passed as keyword arguments to the user function. ```python # Using custom function with FedWatch fedwatch = fw.fedwatch.FedWatch( watch_date='2023-03-10', fomc_dates=fomc_dates, num_upcoming=9, user_func=read_from_excel, # Your custom function path='./data/contracts' # Passed as **kwargs to user_func ) ``` -------------------------------- ### FOMC Class Summary Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Instantiate the FOMC class to view a summary of upcoming and past FOMC meetings. Requires a watch date, a list of FOMC dates, and the number of upcoming meetings to consider. ```python # Testing FOMC class fomc = fw.fomc.FOMC(watch_date = '2023-03-10', fomc_dates = fomc_dates_2, num_upcoming = 9) fomc.summary ``` -------------------------------- ### Import PyFedWatch Library Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Import necessary modules from the PyFedWatch library for data reading and analysis. ```python import pyfedwatch as fw from pyfedwatch.datareader import read_price_history, get_fedfunds_range from pyfedwatch.datareader import read_fomc_data, get_fomc_data ``` -------------------------------- ### Calculate Rate Hike Expectations Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Calculate and display rate hike information using the FedWatch class. This involves initializing the class with relevant dates and data paths, then generating hike information. The output is styled for better readability. ```python # Calculate rate expectations fedwatch = fw.fedwatch.FedWatch(watch_date = '2023-03-10', fomc_dates = fomc_dates_2, num_upcoming = 9, user_func = read_price_history, path = '../data/contracts') fedwatch.generate_hike_info(rate_cols=True).style.format("{:.1%}").background_gradient(axis=1) ``` -------------------------------- ### Generate FOMC Calendar Source: https://github.com/arahimiquant/pyfedwatch/blob/master/README.md Creates an FOMC calendar using the FOMC class. Requires watch_date, fomc_dates, and num_upcoming parameters. ```python import pyfedwatch as fw fomc = fw.fomc.FOMC(watch_date = '2023-03-10', fomc_dates = fomc_dates, num_upcoming = 9) fig = fomc.plot_fomc_calendar() ``` -------------------------------- ### Access Intermediate FedWatch Data Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Access summary and target rate range data from the FedWatch object. Ensure FedWatch is initialized with appropriate parameters. ```python print(fedwatch.fomc_data.summary) # Full summary with price data print(fedwatch.watch_rate_range) # Current target rate range ``` -------------------------------- ### Custom API Data Reader Function (Hypothetical) Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Implement a function to fetch pricing data from a REST API. This function must accept a symbol, API key, and base URL, returning a pandas DataFrame with 'Date' and 'Close' columns. ```python # Example 3: Fetch from API (hypothetical) def read_from_api(symbol: str, api_key: str, base_url: str) -> pd.DataFrame: """Fetch pricing data from a REST API.""" import requests response = requests.get( f'{base_url}/futures/{symbol}', headers={'Authorization': f'Bearer {api_key}'} ) data = response.json() df = pd.DataFrame(data['prices']) df['Date'] = pd.to_datetime(df['date']) df.set_index('Date', inplace=True) df.rename(columns={'close': 'Close'}, inplace=True) return df[['Close']] ``` -------------------------------- ### Calculate Rate Expectations Source: https://github.com/arahimiquant/pyfedwatch/blob/master/README.md Generates a dataframe of rate expectations for upcoming FOMC meetings. Requires watch_date, fomc_dates, num_upcoming, a user-defined function for price history, and a path to contract data. ```python import pyfedwatch as fw fedwatch = fw.fedwatch.FedWatch(watch_date = '2023-03-10', fomc_dates = fomc_dates, num_upcoming = 9, user_func = read_price_history, path = '../data/contracts') fedwatch.generate_hike_info(rate_cols=True).style.format("{:.1%}").background_gradient(axis=1) ``` -------------------------------- ### Read Fed Funds Futures Contract Pricing Data Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Read historical Open, High, Low, Close, and Volume data for a specific Fed Funds futures contract using `read_price_history`. Requires the contract symbol and a path to the data. ```python # Read one of the fed funds futures contracts pricing data ohlc_sample = read_price_history(symbol='ZQJ22', path='../data/contracts') ohlc_sample ``` -------------------------------- ### Custom Excel Data Reader Function Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Implement a function to read pricing data from Excel files. This function must accept a symbol and path, returning a pandas DataFrame with 'Date' and 'Close' columns. ```python import pandas as pd import pyfedwatch as fw # Example 1: Read from Excel files (provided in package) def read_from_excel(symbol: str, path: str) -> pd.DataFrame: """Read pricing data from Excel files.""" return pd.read_excel(f'{path}/{symbol}.xlsx', index_col=0) ``` -------------------------------- ### Calculate Current Fed Rate Range Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Calculates the current Fed Funds target rate range for a given watch date using pre-loaded data. ```python watch_date = '2023-03-10' rate_range = (ff_range.loc[watch_date, 'LL'], ff_range.loc[watch_date, 'UL']) print(f"Watch date rate range: {rate_range}") ``` -------------------------------- ### Custom CSV Data Reader Function Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Implement a function to read pricing data from CSV files. This function must accept a symbol and data directory, returning a pandas DataFrame with 'Date' and 'Close' columns. ```python # Example 2: Read from CSV files def read_from_csv(symbol: str, data_dir: str) -> pd.DataFrame: """Read pricing data from CSV files.""" df = pd.read_csv(f'{data_dir}/{symbol}.csv') df['Date'] = pd.to_datetime(df['Date']) df.set_index('Date', inplace=True) return df ``` -------------------------------- ### Plot FOMC Calendar Source: https://github.com/arahimiquant/pyfedwatch/blob/master/notebooks/00-pyfedwatch-user-guide.ipynb Generate a visual representation of the FOMC calendar using the `plot_fomc_calendar` method from the FOMC class. ```python # Plot FOMC calendar fig = fomc.plot_fomc_calendar() ``` -------------------------------- ### Retrieve FOMC Data from Federal Reserve Website Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieve FOMC meeting data exclusively from the Federal Reserve website. This source includes upcoming meetings. ```python # Get data from Federal Reserve website only (includes upcoming meetings) fomc_fed = get_fomc_data_fed() ``` -------------------------------- ### datareader.get_fedfunds_range - Retrieve Fed Funds Target Rate History Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieves historical Federal Funds target rate lower and upper limits from the FRED database. ```APIDOC ## datareader.get_fedfunds_range - Retrieve Fed Funds Target Rate History ### Description The `get_fedfunds_range` function retrieves historical Federal Funds target rate lower and upper limits from the FRED database. Before December 16, 2008, the Federal Reserve used a single target rate, so both limits are equal for those dates. After that date, the function returns the distinct target range that the Fed uses today. ### Method `get_fedfunds_range()` ### Endpoint N/A (Function call) ### Parameters None ### Request Example ```python from pyfedwatch.datareader import get_fedfunds_range # Get historical Fed Funds target rate range ff_range = get_fedfunds_range() print(ff_range) ``` ### Response #### Success Response (DataFrame) - **Date** (datetime index) - The date of the target rate. - **LL** (float) - The lower limit of the Federal Funds target rate. - **UL** (float) - The upper limit of the Federal Funds target rate. #### Response Example ``` LL UL Date 1982-09-27 10.25 10.25 # Single target rate (pre-2008) 1982-09-28 10.25 10.25 ... 2008-12-16 0.00 0.25 # Target range begins ... 2023-09-19 5.25 5.50 # Current target range ``` ### Usage Examples **Get target rate for a specific date:** ```python target_date = '2023-03-10' rate_on_date = ff_range.loc[target_date] print(f"Lower Limit: {rate_on_date['LL']}%, Upper Limit: {rate_on_date['UL']}%") # Output: Lower Limit: 4.5%, Upper Limit: 4.75% ``` ``` -------------------------------- ### Read Futures Contract Pricing Data Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Reads Fed Funds futures contract pricing data from Excel files. Ensure contract files follow the CME Globex naming convention (ZQ + month code + year). ```python from pyfedwatch.datareader import read_price_history # Read pricing data for March 2023 contract (ZQH23) # Month codes: F=Jan, G=Feb, H=Mar, J=Apr, K=May, M=Jun # N=Jul, Q=Aug, U=Sep, V=Oct, X=Nov, Z=Dec ohlc = read_price_history(symbol='ZQH23', path='./data/contracts') print(ohlc) ``` ```python # Access specific data latest_close = ohlc.iloc[-1]['Close'] implied_rate = 100 - latest_close print(f"Latest close: {latest_close}, Implied rate: {implied_rate:.4f}%") ``` ```python # Get data for a specific date watch_date = '2023-03-10' close_price = ohlc[ohlc.index <= watch_date].iloc[-1]['Close'] print(f"Close price on {watch_date}: {close_price}") ``` -------------------------------- ### Retrieve Combined FOMC Meeting Data Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieve historical and upcoming FOMC meeting dates from both Federal Reserve website and FRASER database. This is the recommended method. ```python from pyfedwatch.datareader import get_fomc_data, get_fomc_data_fed, get_fomc_data_fraser # Get combined FOMC data from both sources (recommended) fomc_data = get_fomc_data() print(fomc_data) # Output: # Status Days # FOMCDate # 1981-02-03 Scheduled February 2-3, 1981 # 1981-03-31 Scheduled March 31, 1981 # 2023-03-22 Scheduled March 21-22, 2023 # 2024-01-31 Scheduled January 30-31, 2024 # ... ``` -------------------------------- ### Retrieve FOMC Data from FRASER Database Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieve FOMC meeting data exclusively from the FRASER database. This source contains historical data and does not include upcoming meetings. ```python # Get data from FRASER database only (historical, no upcoming) fomc_fraser = get_fomc_data_fraser(decades=[1990, 2000, 2010, 2020]) ``` -------------------------------- ### datareader.get_fomc_data - Retrieve FOMC Meeting Dates Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieves historical and upcoming FOMC meeting dates from various sources. ```APIDOC ## datareader.get_fomc_data - Retrieve FOMC Meeting Dates ### Description The `get_fomc_data` function retrieves historical and upcoming FOMC meeting dates by combining data from the Federal Reserve website and the FRASER database. It returns a DataFrame with meeting dates, statuses (Scheduled, Unscheduled, Cancelled, Notation Vote), and a description of the meeting days. This is the recommended method for obtaining FOMC dates. ### Method `get_fomc_data()` ### Endpoint N/A (Function call) ### Parameters None ### Request Example ```python from pyfedwatch.datareader import get_fomc_data, get_fomc_data_fed, get_fomc_data_fraser # Get combined FOMC data from both sources (recommended) fomc_data = get_fomc_data() print(fomc_data) ``` ### Response #### Success Response (DataFrame) - **FOMCDate** (datetime index) - The date of the FOMC meeting. - **Status** (string) - The status of the meeting (e.g., 'Scheduled', 'Unscheduled', 'Cancelled', 'Notation Vote'). - **Days** (string) - A description of the meeting days. #### Response Example ``` Status Days FOMCDate 1981-02-03 Scheduled February 2-3, 1981 1981-03-31 Scheduled March 31, 1981 2023-03-22 Scheduled March 21-22, 2023 2024-01-31 Scheduled January 30-31, 2024 ... ``` ### Related Functions - **`get_fomc_data_fed()`**: Retrieves data from the Federal Reserve website only (includes upcoming meetings). - **`get_fomc_data_fraser(decades=[...])`**: Retrieves data from the FRASER database only (historical, no upcoming meetings). Accepts a list of decades. - **`read_fomc_data(path)`**: Reads FOMC data from a local file path. ### Usage Examples **Filtering for scheduled meetings:** ```python scheduled_meetings = fomc_data[fomc_data['Status'] == 'Scheduled'] fomc_dates = scheduled_meetings.index.tolist() ``` **Using local Excel file:** ```python from pyfedwatch.datareader import read_fomc_data fomc_local = read_fomc_data(path='./data/fomc') fomc_dates_local = fomc_local['FOMCDate'].tolist() ``` ``` -------------------------------- ### Read FOMC Data from Local Excel File Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Read FOMC meeting data from a local Excel file using the `read_fomc_data` function. This provides an alternative to fetching data online. ```python # Using with local Excel file (alternative) from pyfedwatch.datareader import read_fomc_data fomc_local = read_fomc_data(path='./data/fomc') fomc_dates_local = fomc_local['FOMCDate'].tolist() ``` -------------------------------- ### Retrieve Historical Fed Funds Target Rate Range Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Retrieve the historical Federal Funds target rate lower and upper limits from the FRED database. Before December 16, 2008, a single target rate was used. ```python from pyfedwatch.datareader import get_fedfunds_range # Get historical Fed Funds target rate range ff_range = get_fedfunds_range() print(ff_range) # Output: # LL UL # Date # 1982-09-27 10.25 10.25 # Single target rate (pre-2008) # 1982-09-28 10.25 10.25 # ... # 2008-12-16 0.00 0.25 # Target range begins # ... # 2023-09-19 5.25 5.50 # Current target range ``` -------------------------------- ### Filter FOMC Data for Scheduled Meetings Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt Filter the FOMC data DataFrame to include only 'Scheduled' meetings and extract their dates into a list. ```python # Filter for only scheduled meetings (exclude notation votes, cancelled) scheduled_meetings = fomc_data[fomc_data['Status'] == 'Scheduled'] fomc_dates = scheduled_meetings.index.tolist() ``` -------------------------------- ### Required DataFrame Format for Custom Reader Source: https://context7.com/arahimiquant/pyfedwatch/llms.txt The DataFrame returned by a custom data reader function must have a 'Date' index (datetime type) and a 'Close' column (float type). ```python # Required DataFrame format: # Index: Date (datetime) # Columns: Must include 'Close' (float) # Example output from user_func: # Open High Low Close Volume # Date # 2023-01-03 95.125 95.130 95.120 95.125 1000 # 2023-01-04 95.130 95.135 95.125 95.130 1500 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.