{
  "id": 302445,
  "title": "CombinationalPurgedKFold: CPCV",
  "url": "/competitions/g-research-crypto-forecasting/discussion/302445",
  "author_name": "John Doe",
  "post_date": "2022-01-22T15:29:20.207000",
  "votes": 8,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hi.  <br>\nAs you may have already known the book <a href=\"https://www.wiley.com/en-us/Advances+in+Financial+Machine+Learning-p-9781119482086\" target=\"_blank\">Advances in Financial Machine Learning</a> which is famous among people who do <a href=\"https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)\" target=\"_blank\">Quantitative analysis</a> (This is my personal opinion), I created the discussion for CPCV.  </p>\n<p>The author DR. MARCOS LÓPEZ DE PRADO introduced the concept of <strong>Combinational Purged Cross-Validation</strong> which is short for <strong>CPCV</strong>.</p>\n<p>The benefit of <strong>CPCV</strong> is:</p>\n<ol>\n<li><p>Avoid overfitting due to data leakage  <br>\nNormal Kfold cannot avoid data leakage for financial time series data</p></li>\n<li><p>Improve reliability of backtesting  <br>\nIt can give us multiple paths for backtesting</p></li>\n</ol>\n<p>Unfortunately, <a href=\"https://github.com/scikit-learn/scikit-learn\" target=\"_blank\">scikit-learn</a> does not support this feature for now.   <br>\nSo, I have implemented it based on scikit learn.  </p>\n<p>I am now preparing pull request to github of scikit-learn.  <br>\nIf this pull request is hopefully approved, this feature will be publicly available.</p>\n<p>Also, I will share the notebook.</p>\n<hr>\n<p>The dead line is coming soon.<br>\nSo it would be better discuss CPCV here.<br>\n<a href=\"https://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722\" target=\"_blank\">https://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722</a></p>",
  "messages": [
    {
      "id": 1660307,
      "postDate": "2022-01-22T15:29:20.207Z",
      "content": "<p>Hi.  <br>\nAs you may have already known the book <a href=\"https://www.wiley.com/en-us/Advances+in+Financial+Machine+Learning-p-9781119482086\" target=\"_blank\">Advances in Financial Machine Learning</a> which is famous among people who do <a href=\"https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)\" target=\"_blank\">Quantitative analysis</a> (This is my personal opinion), I created the discussion for CPCV.  </p>\n<p>The author DR. MARCOS LÓPEZ DE PRADO introduced the concept of <strong>Combinational Purged Cross-Validation</strong> which is short for <strong>CPCV</strong>.</p>\n<p>The benefit of <strong>CPCV</strong> is:</p>\n<ol>\n<li><p>Avoid overfitting due to data leakage  <br>\nNormal Kfold cannot avoid data leakage for financial time series data</p></li>\n<li><p>Improve reliability of backtesting  <br>\nIt can give us multiple paths for backtesting</p></li>\n</ol>\n<p>Unfortunately, <a href=\"https://github.com/scikit-learn/scikit-learn\" target=\"_blank\">scikit-learn</a> does not support this feature for now.   <br>\nSo, I have implemented it based on scikit learn.  </p>\n<p>I am now preparing pull request to github of scikit-learn.  <br>\nIf this pull request is hopefully approved, this feature will be publicly available.</p>\n<p>Also, I will share the notebook.</p>\n<hr>\n<p>The dead line is coming soon.<br>\nSo it would be better discuss CPCV here.<br>\n<a href=\"https://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722\" target=\"_blank\">https://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722</a></p>",
      "rawMarkdown": "Hi.  \nAs you may have already known the book [Advances in Financial Machine Learning](https://www.wiley.com/en-us/Advances+in+Financial+Machine+Learning-p-9781119482086) which is famous among people who do [Quantitative analysis](https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)) (This is my personal opinion), I created the discussion for CPCV.  \n\nThe author DR. MARCOS LÓPEZ DE PRADO introduced the concept of **Combinational Purged Cross-Validation** which is short for **CPCV**.\n\nThe benefit of **CPCV** is:\n\n1. Avoid overfitting due to data leakage  \nNormal Kfold cannot avoid data leakage for financial time series data\n\n2. Improve reliability of backtesting  \nIt can give us multiple paths for backtesting\n\nUnfortunately, [scikit-learn](https://github.com/scikit-learn/scikit-learn) does not support this feature for now.   \nSo, I have implemented it based on scikit learn.  \n\nI am now preparing pull request to github of scikit-learn.  \nIf this pull request is hopefully approved, this feature will be publicly available.\n\nAlso, I will share the notebook.\n\n--------------------------------------------\nThe dead line is coming soon.\nSo it would be better discuss CPCV here.\nhttps://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722",
      "votes": 7
    },
    {
      "id": 1661958,
      "postDate": "2022-01-23T21:19:43.750Z",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/osamurai\" target=\"_blank\">@osamurai</a>. Thanks for the implementation. You might want to share this to the new Ubiquant competition. It might be a bit late to get the interest it deserves here.</p>",
      "rawMarkdown": "Hey @osamurai. Thanks for the implementation. You might want to share this to the new Ubiquant competition. It might be a bit late to get the interest it deserves here.",
      "votes": 1
    },
    {
      "id": 1660421,
      "postDate": "2022-01-22T17:04:26.807Z",
      "content": "<p>Great, Keep going</p>",
      "rawMarkdown": "Great, Keep going",
      "votes": 1
    },
    {
      "id": 1660970,
      "postDate": "2022-01-23T06:00:48.653Z",
      "content": "<p>Here is notebook.<br>\nSource code is also available from there.</p>\n<p><a href=\"https://www.kaggle.com/osamurai/implementation-cpcv/notebook\" target=\"_blank\">https://www.kaggle.com/osamurai/implementation-cpcv/notebook</a></p>",
      "rawMarkdown": "Here is notebook.\nSource code is also available from there.\n\nhttps://www.kaggle.com/osamurai/implementation-cpcv/notebook"
    },
    {
      "id": 1660411,
      "postDate": "2022-01-22T16:48:31.957Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 1660865,
          "postDate": "2022-01-23T03:27:15.713Z",
          "content": "<p>I will announce notebook also share my draft pull request from my forked branch.<br>\nIf you find it is useful, I would appreciate if you could add star to my forked branch.<br>\nFor now it seems that scikit learn community is not interested in this feature from the reaction to issue created by me.</p>",
          "rawMarkdown": "I will announce notebook also share my draft pull request from my forked branch.\nIf you find it is useful, I would appreciate if you could add star to my forked branch.\nFor now it seems that scikit learn community is not interested in this feature from the reaction to issue created by me."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1661958,
      "author_name": "Lucas Morin",
      "author_url": "",
      "post_date": "2022-01-23T21:19:43.750000",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/osamurai\" target=\"_blank\">@osamurai</a>. Thanks for the implementation. You might want to share this to the new Ubiquant competition. It might be a bit late to get the interest it deserves here.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1660421,
      "author_name": "amir ardeshir",
      "author_url": "",
      "post_date": "2022-01-22T17:04:26.807000",
      "content": "<p>Great, Keep going</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1660970,
      "author_name": "John Doe",
      "author_url": "",
      "post_date": "2022-01-23T06:00:48.653000",
      "content": "<p>Here is notebook.<br>\nSource code is also available from there.</p>\n<p><a href=\"https://www.kaggle.com/osamurai/implementation-cpcv/notebook\" target=\"_blank\">https://www.kaggle.com/osamurai/implementation-cpcv/notebook</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1660411,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-01-22T16:48:31.957000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1660865,
          "author_name": "John Doe",
          "author_url": "",
          "post_date": "2022-01-23T03:27:15.713000",
          "content": "<p>I will announce notebook also share my draft pull request from my forked branch.<br>\nIf you find it is useful, I would appreciate if you could add star to my forked branch.<br>\nFor now it seems that scikit learn community is not interested in this feature from the reaction to issue created by me.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1660307": "Hi.  \nAs you may have already known the book [Advances in Financial Machine Learning](https://www.wiley.com/en-us/Advances+in+Financial+Machine+Learning-p-9781119482086) which is famous among people who do [Quantitative analysis](https://en.wikipedia.org/wiki/Quantitative_analysis_(finance)) (This is my personal opinion), I created the discussion for CPCV.  \n\nThe author DR. MARCOS LÓPEZ DE PRADO introduced the concept of **Combinational Purged Cross-Validation** which is short for **CPCV**.\n\nThe benefit of **CPCV** is:\n\n1. Avoid overfitting due to data leakage  \nNormal Kfold cannot avoid data leakage for financial time series data\n\n2. Improve reliability of backtesting  \nIt can give us multiple paths for backtesting\n\nUnfortunately, [scikit-learn](https://github.com/scikit-learn/scikit-learn) does not support this feature for now.   \nSo, I have implemented it based on scikit learn.  \n\nI am now preparing pull request to github of scikit-learn.  \nIf this pull request is hopefully approved, this feature will be publicly available.\n\nAlso, I will share the notebook.\n\n--------------------------------------------\nThe dead line is coming soon.\nSo it would be better discuss CPCV here.\nhttps://www.kaggle.com/c/ubiquant-market-prediction/discussion/302722",
    "1661958": "Hey @osamurai. Thanks for the implementation. You might want to share this to the new Ubiquant competition. It might be a bit late to get the interest it deserves here.",
    "1660421": "Great, Keep going",
    "1660970": "Here is notebook.\nSource code is also available from there.\n\nhttps://www.kaggle.com/osamurai/implementation-cpcv/notebook",
    "1660411": ""
  }
}