Hugo Delatte

Results 54 comments of Hugo Delatte

Thanks for the suggestion, you’re right! I’ve been using both interchangeably since they both call the same low-level C code, but I never considered the small type‑checking overhead.

Hello, This is how to do it: ```python from skfolio import RiskMeasure, Population from skfolio.datasets import load_sp500_dataset from skfolio.optimization import MeanRisk, ObjectiveFunction from skfolio.preprocessing import prices_to_returns from skfolio.model_selection import WalkForward,cross_val_predict...

I see, that's indeed missing. Until we fix it, you can do that: ```python # Change portfolio name for ptf in pred.portfolios: obs = ptf.observations ptf.name = f"{pd.Timestamp(obs[0]):%Y-%m-%d} - {pd.Timestamp(obs[-1]):%Y-%m-%d}"...

The param `idx` only accepts integers (iloc). So you can either provide the DataFrame indices or if you want to use date loc you can do the following: ```python fig...

The tracking error is expressed in the same frequency as your input returns `X` (so daily if your returns are daily returns). The code for the tracking error is [here](https://github.com/skfolio/skfolio/blob/09af26457c2a669eae5e19a88d2c8b58df795ccd/src/skfolio/optimization/convex/_base.py#L1512)...

Hello, it's quite interesting that you decided to use **CombinatorialPurgedCV** for general ML estimators rather than **skfolio's** portfolio models. The `split` method of **CombinatorialPurgedCV** differs from the scikit-learn cross-validator API...

In the meantime, you can do the following: ```python class CPCV(CombinatorialPurgedCV): def split(self, X, y=None, groups=None): for train_index, test_index_list in super().split(X, y, groups): yield train_index, np.concatenate(test_index_list) cpcv = CPCV(n_folds=N, n_test_folds=k)...

After some consideration, aggregating test indices would create overlapping test sets, reduce variability in test conditions, and potentially introduce bias. However, it could still be a valid approach for datasets...

yes the outcome should be the same. Thanks, have great holidays too!