diff --git a/src/utils/qdf/blacklist.rs b/src/utils/qdf/blacklist.rs new file mode 100644 index 0000000..9fb8537 --- /dev/null +++ b/src/utils/qdf/blacklist.rs @@ -0,0 +1,27 @@ +use crate::utils::dateutils::{get_bdates_series_default_opt, get_min_max_real_dates}; +use crate::utils::qdf::core::*; +use chrono::{Duration, NaiveDate}; +use polars::prelude::*; +use std::collections::HashMap; +use std::error::Error; + +use super::pivots::pivot_dataframe_by_ticker; + +/// The required columns for a Quantamental DataFrame. +const QDF_INDEX_COLUMNS: [&str; 3] = ["real_date", "cid", "xcat"]; + +pub fn create_blacklist_from_qdf( + df: &DataFrame, + metric: Option, + start: Option, + end: Option, +) -> Result>, Box> { + // Verify that the DataFrame follows the Quantamental structure. + check_quantamental_dataframe(df)?; + let mut blacklist: HashMap> = HashMap::new(); + + // Use the provided metric or default to "value". + let metric = metric.unwrap_or_else(|| "value".into()); + + Ok(blacklist) +}