{
  "id": 347647,
  "title": "Nine lines of feature engineering code to got 0.80727 private score --- alpha 191 factor base on Quant",
  "url": "/competitions/amex-default-prediction/discussion/347647",
  "author_name": "Mingjie Wang",
  "post_date": "2022-08-25T01:03:00.941000",
  "votes": 31,
  "comment_count": 10,
  "views": 0,
  "content": "<p>I did a few feature works on the alpha factor of Quant, a few features sifted from alpha191, plus the base statistical feature :P</p>\n<p>For more factors please see <a href=\"https://www.joinquant.com/data/dict/alpha191\" target=\"_blank\">it</a></p>\n<pre><code>    train[f'{col}_alpha_014_5'] = train[f'{col}_last'] - train[f'{col}_shift_last_5'] \n    train[f'{col}_alpha_014_8'] = train[f'{col}_last'] - train[f'{col}_shift_last_8'] \n    train[f'{col}_alpha_014_5_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_5']\n    train[f'{col}_alpha_014_8_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_8']\n    train[f'{col}_alpha_013'] = ((train[f'{col}_max'] * train[f'{col}_min'])**0.5)-train[f'{col}_mean']\n    train[f'{col}_alpha_031'] = ((train[f'{col}_min'] - train[f'{col}_mean'])/train[f'{col}_mean'])*100\n    train[f'{col}_alpha_126'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3\n    train[f'{col}_alpha_151'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3*train[f'count']\n    train[f'{col}_alpha_171'] = (-1*((train[f'{col}_min']-train[f'{col}_last'])*(train[f'{col}_first']*5))/(train[f'{col}_last']-train[f'{col}_max'])*(train[f'{col}_last']*5))\n</code></pre>\n<p> </p>\n<p>I have joined JoinQuant(聚宽投资) as a quantitative researcher.</p>",
  "messages": [
    {
      "id": 1912781,
      "postDate": "2022-08-25T01:03:00.940Z",
      "content": "<p>I did a few feature works on the alpha factor of Quant, a few features sifted from alpha191, plus the base statistical feature :P</p>\n<p>For more factors please see <a href=\"https://www.joinquant.com/data/dict/alpha191\" target=\"_blank\">it</a></p>\n<pre><code>    train[f'{col}_alpha_014_5'] = train[f'{col}_last'] - train[f'{col}_shift_last_5'] \n    train[f'{col}_alpha_014_8'] = train[f'{col}_last'] - train[f'{col}_shift_last_8'] \n    train[f'{col}_alpha_014_5_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_5']\n    train[f'{col}_alpha_014_8_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_8']\n    train[f'{col}_alpha_013'] = ((train[f'{col}_max'] * train[f'{col}_min'])**0.5)-train[f'{col}_mean']\n    train[f'{col}_alpha_031'] = ((train[f'{col}_min'] - train[f'{col}_mean'])/train[f'{col}_mean'])*100\n    train[f'{col}_alpha_126'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3\n    train[f'{col}_alpha_151'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3*train[f'count']\n    train[f'{col}_alpha_171'] = (-1*((train[f'{col}_min']-train[f'{col}_last'])*(train[f'{col}_first']*5))/(train[f'{col}_last']-train[f'{col}_max'])*(train[f'{col}_last']*5))\n</code></pre>\n<p> </p>\n<p>I have joined JoinQuant(聚宽投资) as a quantitative researcher.</p>",
      "rawMarkdown": "I did a few feature works on the alpha factor of Quant, a few features sifted from alpha191, plus the base statistical feature :P\n\nFor more factors please see [it](https://www.joinquant.com/data/dict/alpha191)\n\n        train[f'{col}_alpha_014_5'] = train[f'{col}_last'] - train[f'{col}_shift_last_5'] \n        train[f'{col}_alpha_014_8'] = train[f'{col}_last'] - train[f'{col}_shift_last_8'] \n        train[f'{col}_alpha_014_5_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_5']\n        train[f'{col}_alpha_014_8_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_8']\n        train[f'{col}_alpha_013'] = ((train[f'{col}_max'] * train[f'{col}_min'])**0.5)-train[f'{col}_mean']\n        train[f'{col}_alpha_031'] = ((train[f'{col}_min'] - train[f'{col}_mean'])/train[f'{col}_mean'])*100\n        train[f'{col}_alpha_126'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3\n        train[f'{col}_alpha_151'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3*train[f'count']\n        train[f'{col}_alpha_171'] = (-1*((train[f'{col}_min']-train[f'{col}_last'])*(train[f'{col}_first']*5))/(train[f'{col}_last']-train[f'{col}_max'])*(train[f'{col}_last']*5))\n\n~~PS: I am about to receive my Mphil's degree in 2023 and am looking for a job about Quant and NLP in the autumn. If any, please contact me via email.~~ \n\nI have joined JoinQuant(聚宽投资) as a quantitative researcher.\n\n",
      "votes": 30
    },
    {
      "id": 1912837,
      "postDate": "2022-08-25T01:53:13.487Z",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10255013%2Fe0bc5689ccd9d895241b41177023be6e%2Fwut.jpg?generation=1661392381971440&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10255013%2Fe0bc5689ccd9d895241b41177023be6e%2Fwut.jpg?generation=1661392381971440&alt=media)",
      "votes": 8
    },
    {
      "id": 1912891,
      "postDate": "2022-08-25T02:51:00.430Z",
      "content": "<p>Ming, we have a few posts open at Amaris. Ping me on your CV.</p>",
      "rawMarkdown": "Ming, we have a few posts open at Amaris. Ping me on your CV.",
      "votes": 1,
      "replies": [
        {
          "id": 1912894,
          "postDate": "2022-08-25T02:56:48.680Z",
          "content": "<p>Thanks for your respond positively!<br>\nCan you share any contact details with me? e.g. LinkedIn or email</p>",
          "rawMarkdown": "Thanks for your respond positively!\nCan you share any contact details with me? e.g. LinkedIn or email"
        }
      ]
    },
    {
      "id": 1912883,
      "postDate": "2022-08-25T02:43:17.647Z",
      "content": "<p>Congrats! What's the intuition for 8 and 5-month lag? is it pure data mining?</p>",
      "rawMarkdown": "Congrats! What's the intuition for 8 and 5-month lag? is it pure data mining?",
      "votes": 1,
      "replies": [
        {
          "id": 1912887,
          "postDate": "2022-08-25T02:47:15.643Z",
          "content": "<p>I did a visualization of the features for each time slice and most of them were the same. I think the same parts can be learned by other features, so I only modeled 5 and 8</p>",
          "rawMarkdown": "I did a visualization of the features for each time slice and most of them were the same. I think the same parts can be learned by other features, so I only modeled 5 and 8"
        }
      ]
    },
    {
      "id": 1912860,
      "postDate": "2022-08-25T02:27:43.990Z",
      "content": "<p>Congratulations. Great features!</p>",
      "rawMarkdown": "Congratulations. Great features!",
      "votes": 1,
      "replies": [
        {
          "id": 1912879,
          "postDate": "2022-08-25T02:41:22.330Z",
          "content": "<p>Thanks for your kind words! I hope to team up with the grandmaster like you next time!</p>",
          "rawMarkdown": "Thanks for your kind words! I hope to team up with the grandmaster like you next time!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1912799,
      "postDate": "2022-08-25T01:14:14.767Z",
      "rawMarkdown": "",
      "votes": 2,
      "isDeleted": true,
      "replies": [
        {
          "id": 1912806,
          "postDate": "2022-08-25T01:20:06.893Z",
          "content": "<ol>\n<li>To be precise it should be: DELAY<br>\nDELAY(A, n)：A{i−n} </li>\n<li>All columns. I used high L1 and L2.</li>\n</ol>",
          "rawMarkdown": "1. To be precise it should be: DELAY\nDELAY(A, n)：A{i−n} \n2. All columns. I used high L1 and L2.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1913530,
      "postDate": "2022-08-25T10:54:54.313Z",
      "content": "<p>Great score! Thanks for sharing this!</p>",
      "rawMarkdown": "Great score! Thanks for sharing this!",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1912837,
      "author_name": "Lil Gaussy",
      "author_url": "",
      "post_date": "2022-08-25T01:53:13.487000",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10255013%2Fe0bc5689ccd9d895241b41177023be6e%2Fwut.jpg?generation=1661392381971440&amp;alt=media\" alt=\"\"></p>",
      "votes": 8,
      "replies": []
    },
    {
      "id": 1912891,
      "author_name": "Patrick Chan",
      "author_url": "",
      "post_date": "2022-08-25T02:51:00.430000",
      "content": "<p>Ming, we have a few posts open at Amaris. Ping me on your CV.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1912894,
          "author_name": "Mingjie Wang",
          "author_url": "",
          "post_date": "2022-08-25T02:56:48.680000",
          "content": "<p>Thanks for your respond positively!<br>\nCan you share any contact details with me? e.g. LinkedIn or email</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1912883,
      "author_name": "ZC Wang",
      "author_url": "",
      "post_date": "2022-08-25T02:43:17.647000",
      "content": "<p>Congrats! What's the intuition for 8 and 5-month lag? is it pure data mining?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1912887,
          "author_name": "Mingjie Wang",
          "author_url": "",
          "post_date": "2022-08-25T02:47:15.643000",
          "content": "<p>I did a visualization of the features for each time slice and most of them were the same. I think the same parts can be learned by other features, so I only modeled 5 and 8</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1912860,
      "author_name": "Chris Deotte",
      "author_url": "",
      "post_date": "2022-08-25T02:27:43.990000",
      "content": "<p>Congratulations. Great features!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1912879,
          "author_name": "Mingjie Wang",
          "author_url": "",
          "post_date": "2022-08-25T02:41:22.330000",
          "content": "<p>Thanks for your kind words! I hope to team up with the grandmaster like you next time!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1912799,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-25T01:14:14.767000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1912806,
          "author_name": "Mingjie Wang",
          "author_url": "",
          "post_date": "2022-08-25T01:20:06.893000",
          "content": "<ol>\n<li>To be precise it should be: DELAY<br>\nDELAY(A, n)：A{i−n} </li>\n<li>All columns. I used high L1 and L2.</li>\n</ol>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1913530,
      "author_name": "Devika L",
      "author_url": "",
      "post_date": "2022-08-25T10:54:54.313000",
      "content": "<p>Great score! Thanks for sharing this!</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1912781": "I did a few feature works on the alpha factor of Quant, a few features sifted from alpha191, plus the base statistical feature :P\n\nFor more factors please see [it](https://www.joinquant.com/data/dict/alpha191)\n\n        train[f'{col}_alpha_014_5'] = train[f'{col}_last'] - train[f'{col}_shift_last_5'] \n        train[f'{col}_alpha_014_8'] = train[f'{col}_last'] - train[f'{col}_shift_last_8'] \n        train[f'{col}_alpha_014_5_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_5']\n        train[f'{col}_alpha_014_8_div'] = train[f'{col}_last'] / train[f'{col}_shift_last_8']\n        train[f'{col}_alpha_013'] = ((train[f'{col}_max'] * train[f'{col}_min'])**0.5)-train[f'{col}_mean']\n        train[f'{col}_alpha_031'] = ((train[f'{col}_min'] - train[f'{col}_mean'])/train[f'{col}_mean'])*100\n        train[f'{col}_alpha_126'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3\n        train[f'{col}_alpha_151'] = (train[f'{col}_min']+train[f'{col}_max']+train[f'{col}_last'])/3*train[f'count']\n        train[f'{col}_alpha_171'] = (-1*((train[f'{col}_min']-train[f'{col}_last'])*(train[f'{col}_first']*5))/(train[f'{col}_last']-train[f'{col}_max'])*(train[f'{col}_last']*5))\n\n~~PS: I am about to receive my Mphil's degree in 2023 and am looking for a job about Quant and NLP in the autumn. If any, please contact me via email.~~ \n\nI have joined JoinQuant(聚宽投资) as a quantitative researcher.\n\n",
    "1912837": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10255013%2Fe0bc5689ccd9d895241b41177023be6e%2Fwut.jpg?generation=1661392381971440&alt=media)",
    "1912891": "Ming, we have a few posts open at Amaris. Ping me on your CV.",
    "1912883": "Congrats! What's the intuition for 8 and 5-month lag? is it pure data mining?",
    "1912860": "Congratulations. Great features!",
    "1912799": "",
    "1913530": "Great score! Thanks for sharing this!"
  }
}