{
  "status": "source_specification_and_executable_reference_extracted; numerical_equivalence_checks_pending",
  "previous_goal_turn_classification": "progress: actual goal reset and independently verified active",
  "original_title": "(`23.08.05 - )Portfolio with Network Analysis",
  "source_notebook": "C:\\dev\\08_resources\\_tmp\\raidrive_full\\net_peek\\nb_230810.ipynb",
  "notebook_sha256": "cc1e52ac7ea254622dda465786af4933e03fdb82d0575891a250f57143818567",
  "cell_index": 7,
  "cell_source_sha256": "3f01bfb914dfb570057cc1db7f484c81147500f5da2751573a20e5ba6ec7c6a2",
  "extracted_methods": [
    {
      "class": "CorrelationCalculator",
      "method": "compute_rolling_corr",
      "cell_index": 7,
      "cell_line_start": 147,
      "cell_line_end": 182,
      "source_sha256": "38d3da489aff9aba624516c1b8ea78904af7e96d89ae98953ba617068a759002"
    },
    {
      "class": "CorrelationCalculator",
      "method": "compute_all_pairs",
      "cell_index": 7,
      "cell_line_start": 184,
      "cell_line_end": 202,
      "source_sha256": "abb59d93ea703b091af830cf7e9513e70c09427147820b689a8a0b8d6cf797bc"
    },
    {
      "class": "NetworkGenerator",
      "method": "__init__",
      "cell_index": 7,
      "cell_line_start": 250,
      "cell_line_end": 251,
      "source_sha256": "6200b87270ab30d97bd8f9b7b280889ddbb666d1f3943875600826fa7f7aabce"
    },
    {
      "class": "NetworkGenerator",
      "method": "initialize_networks",
      "cell_index": 7,
      "cell_line_start": 253,
      "cell_line_end": 255,
      "source_sha256": "8972b7770229f5e1428fcf5a74edd729645e187ce933d1aa82270ae72e5d19d7"
    },
    {
      "class": "NetworkGenerator",
      "method": "construct_networks",
      "cell_index": 7,
      "cell_line_start": 257,
      "cell_line_end": 276,
      "source_sha256": "2218ce577e0ba7978d456cd99024fdd81435e3c2819fd2db38041a3c5f47f120"
    },
    {
      "class": "NetworkGenerator",
      "method": "apply_louvain_method",
      "cell_index": 7,
      "cell_line_start": 282,
      "cell_line_end": 284,
      "source_sha256": "6abdc1d2a717c6e8ca3421e69c894ca93bc6b8babb7c2a55dcca7b6cd8836e29"
    },
    {
      "class": "NetworkGenerator",
      "method": "compute_degree_centralities",
      "cell_index": 7,
      "cell_line_start": 286,
      "cell_line_end": 288,
      "source_sha256": "893180924758ce16725db9b72d935c7c104dd88ba977dcc515db00c5d94f06a2"
    },
    {
      "class": "NetworkGenerator",
      "method": "add_edge_to_graph_close",
      "cell_index": 7,
      "cell_line_start": 290,
      "cell_line_end": 294,
      "source_sha256": "096dc7396755f6f9348e1cd8e328ae6c87da176fdde6905ed8cba544aefecfcc"
    },
    {
      "class": "NetworkGenerator",
      "method": "parallel_processing_close",
      "cell_index": 7,
      "cell_line_start": 296,
      "cell_line_end": 305,
      "source_sha256": "6fec61f02e25b966197d95b7773d36e57caad377039cad8d8690fe455abc98f4"
    },
    {
      "class": "NetworkGenerator",
      "method": "add_edge_to_graph_volume",
      "cell_index": 7,
      "cell_line_start": 307,
      "cell_line_end": 311,
      "source_sha256": "f31fd051acbd234a025934cee84eadc859b512e9e7d5a0d20cd36cba3b432266"
    },
    {
      "class": "NetworkGenerator",
      "method": "parallel_processing_volume",
      "cell_index": 7,
      "cell_line_start": 313,
      "cell_line_end": 322,
      "source_sha256": "44a917ef98d0a3deae9b5b55d071d0874156ef1fdb197eb7a6620f4c84179f1b"
    },
    {
      "class": "Analysis",
      "method": "__init__",
      "cell_index": 7,
      "cell_line_start": 325,
      "cell_line_end": 335,
      "source_sha256": "18438d7dae3dd1246f017c4e1c3e4df2de0205fc9df6ae1fb7353b65da41410e"
    },
    {
      "class": "Analysis",
      "method": "analyze_networks",
      "cell_index": 7,
      "cell_line_start": 372,
      "cell_line_end": 380,
      "source_sha256": "3789a5981d248be4d5923ebd423a60c0268503eb9190c9bcf567bc5a895b0181"
    },
    {
      "class": "Analysis",
      "method": "_analyze_partition",
      "cell_index": 7,
      "cell_line_start": 382,
      "cell_line_end": 387,
      "source_sha256": "3918c5d960fda194d3859528506337015c7fc800eb5e301d2d67b119a143da35"
    },
    {
      "class": "Analysis",
      "method": "determine_positions",
      "cell_index": 7,
      "cell_line_start": 401,
      "cell_line_end": 414,
      "source_sha256": "95742b719ad0ac597211530ea321bca6816d99df805e42e1b3523aba8b3ef2ef"
    }
  ],
  "reference_sha256": "21763e24a378b2e2b15452ffb5d1ebdbd7617b1d8e662775320301a847210136",
  "local_notebook_variants": [
    {
      "filename": "nb_230720.ipynb",
      "sha256": "2ab3664f20979b59b8c92dfc35708cb73290c9d8ea1a0976324ae60ebeffcecd",
      "cell_settings": [
        {
          "cell_index": 5,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 60,
              "line": 16
            }
          ]
        },
        {
          "cell_index": 6,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 4,
              "line": 35
            }
          ]
        },
        {
          "cell_index": 7,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 4,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 8,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 7,
              "line": 32
            }
          ]
        },
        {
          "cell_index": 9,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 4,
              "line": 42
            }
          ]
        },
        {
          "cell_index": 10,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 4,
              "line": 38
            }
          ]
        },
        {
          "cell_index": 11,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 4,
              "line": 38
            }
          ]
        },
        {
          "cell_index": 14,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 44
            }
          ]
        },
        {
          "cell_index": 16,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 50
            }
          ]
        },
        {
          "cell_index": 17,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 35
            }
          ]
        },
        {
          "cell_index": 18,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 32
            },
            {
              "name": "lag",
              "value": 2,
              "line": 33
            }
          ]
        },
        {
          "cell_index": 20,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 22,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 23,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 50
            },
            {
              "name": "lag",
              "value": 5,
              "line": 51
            }
          ]
        },
        {
          "cell_index": 24,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 50
            },
            {
              "name": "lag",
              "value": 5,
              "line": 51
            }
          ]
        },
        {
          "cell_index": 26,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 47
            }
          ]
        },
        {
          "cell_index": 29,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 27,
              "line": 45
            },
            {
              "name": "lag",
              "value": 5,
              "line": 46
            }
          ]
        }
      ]
    },
    {
      "filename": "nb_230810.ipynb",
      "sha256": "cc1e52ac7ea254622dda465786af4933e03fdb82d0575891a250f57143818567",
      "cell_settings": [
        {
          "cell_index": 9,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 169
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 170
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 171
            },
            {
              "name": "lag",
              "value": 5,
              "line": 172
            }
          ]
        },
        {
          "cell_index": 10,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 180
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 181
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 182
            },
            {
              "name": "lag",
              "value": 5,
              "line": 183
            }
          ]
        },
        {
          "cell_index": 12,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 208
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 209
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 210
            },
            {
              "name": "lag",
              "value": 5,
              "line": 211
            }
          ]
        },
        {
          "cell_index": 17,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 175
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 176
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 177
            },
            {
              "name": "lag",
              "value": 5,
              "line": 178
            }
          ]
        },
        {
          "cell_index": 19,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 28
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 29
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 30
            },
            {
              "name": "lag",
              "value": 5,
              "line": 31
            }
          ]
        },
        {
          "cell_index": 22,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 28
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 29
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 30
            },
            {
              "name": "lag",
              "value": 5,
              "line": 31
            }
          ]
        },
        {
          "cell_index": 23,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 27
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 28
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 27,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 27
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 28
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 33,
          "literal_assignments": [
            {
              "name": "thres_per",
              "value": 90,
              "line": 46
            },
            {
              "name": "n_stocks_long",
              "value": 200,
              "line": 47
            },
            {
              "name": "n_stocks_short",
              "value": 200,
              "line": 48
            },
            {
              "name": "window_size",
              "value": 14,
              "line": 57
            },
            {
              "name": "lag",
              "value": 3,
              "line": 58
            }
          ]
        },
        {
          "cell_index": 40,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 5,
              "line": 31
            },
            {
              "name": "lag",
              "value": 2,
              "line": 32
            },
            {
              "name": "thres_per",
              "value": 85,
              "line": 51
            },
            {
              "name": "n_stocks_long",
              "value": 10,
              "line": 68
            },
            {
              "name": "n_stocks_short",
              "value": 5,
              "line": 69
            }
          ]
        },
        {
          "cell_index": 41,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 5,
              "line": 88
            },
            {
              "name": "lag",
              "value": 2,
              "line": 89
            }
          ]
        }
      ]
    },
    {
      "filename": "nb_230901.ipynb",
      "sha256": "76d11045ae898028f30e6209efb53a4ec0b6077ce02353e05dacd9db74c67717",
      "cell_settings": [
        {
          "cell_index": 7,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 177
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 178
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 179
            },
            {
              "name": "lag",
              "value": 5,
              "line": 180
            }
          ]
        },
        {
          "cell_index": 8,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 208
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 209
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 210
            },
            {
              "name": "lag",
              "value": 5,
              "line": 211
            }
          ]
        },
        {
          "cell_index": 16,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 175
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 176
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 177
            },
            {
              "name": "lag",
              "value": 5,
              "line": 178
            }
          ]
        },
        {
          "cell_index": 18,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 28
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 29
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 30
            },
            {
              "name": "lag",
              "value": 5,
              "line": 31
            }
          ]
        },
        {
          "cell_index": 21,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 28
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 29
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 30
            },
            {
              "name": "lag",
              "value": 5,
              "line": 31
            }
          ]
        },
        {
          "cell_index": 22,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 27
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 28
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 26,
          "literal_assignments": [
            {
              "name": "n_stocks_long",
              "value": 30,
              "line": 27
            },
            {
              "name": "n_stocks_short",
              "value": 30,
              "line": 28
            },
            {
              "name": "window_size",
              "value": 7,
              "line": 29
            },
            {
              "name": "lag",
              "value": 5,
              "line": 30
            }
          ]
        },
        {
          "cell_index": 32,
          "literal_assignments": [
            {
              "name": "thres_per",
              "value": 90,
              "line": 46
            },
            {
              "name": "n_stocks_long",
              "value": 200,
              "line": 47
            },
            {
              "name": "n_stocks_short",
              "value": 200,
              "line": 48
            },
            {
              "name": "window_size",
              "value": 14,
              "line": 57
            },
            {
              "name": "lag",
              "value": 3,
              "line": 58
            }
          ]
        },
        {
          "cell_index": 39,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 5,
              "line": 31
            },
            {
              "name": "lag",
              "value": 2,
              "line": 32
            },
            {
              "name": "thres_per",
              "value": 85,
              "line": 51
            },
            {
              "name": "n_stocks_long",
              "value": 10,
              "line": 68
            },
            {
              "name": "n_stocks_short",
              "value": 5,
              "line": 69
            }
          ]
        },
        {
          "cell_index": 40,
          "literal_assignments": [
            {
              "name": "window_size",
              "value": 5,
              "line": 88
            },
            {
              "name": "lag",
              "value": 2,
              "line": 89
            }
          ]
        }
      ]
    }
  ],
  "source_method": {
    "inputs": "Raw Close and Volume levels; pairwise intersection of dates before lagging. KOSPI is appended as another node in the class-based loader.",
    "correlation": "corr(X_i(t-lag), X_j(t)) over window complete paired observations; only i<j in input order, not both directions.",
    "parallel_pair_policy": "Split symbols into workers strided chunks, then compute only within-chunk combinations. Cross-chunk pairs are omitted; cpu_count changes the graph.",
    "threshold": "Percentile of absolute correlations pooled across all supplied dates and computed pairs, strict greater-than selection. The class default is 90, not universally 95.",
    "graph": "Undirected nx.Graph. Repeated pair observations overwrite weights in row order. Infinite and negative final edge weights are removed after construction. Nodes are introduced by qualifying edges, not the full universe.",
    "communities": "python-louvain best_partition, no explicit random seed in the selected original cell.",
    "centrality": "networkx degree_centrality, calculated separately on the price and volume graphs.",
    "ranking": "Keep symbols present in both centrality dictionaries; group by price community then globally sort by descending price centrality and descending volume centrality. No final community allocation quotas.",
    "positions": "Top n long and tail n short. The selected Analysis.determine_positions has a fallback that mixes tuple rows and string symbols; later stock[0] truncates a string identifier. Overlap is not explicitly prevented.",
    "performance": "Selection-period returns are reused in some cells; rebalancing code also loads through next_rebalancing_date before constructing the current graph. These are not validated deployable returns."
  },
  "source_issues_to_reproduce_then_correct": [
    "Worker-count-dependent pair omission",
    "One lag orientation depends on symbol ordering; undirected graph does not preserve that orientation",
    "All-date percentile and repeated-edge collapse lose daily state and can use future information",
    "Final negative overwrite can remove an earlier qualifying positive edge",
    "Edge-only node creation changes the centrality denominator and common-node selection",
    "Unseeded community detection and tie traversal affect reproducibility",
    "Mixed-type short fallback can truncate symbol codes",
    "Rebalancing loop reads into the intended holding period before selection"
  ],
  "adaptation_change_log": [
    "Complete-pair sequential enumeration replaces worker-chunk omission in the dated path; original omission remains available for audit.",
    "Date-specific graph cross-sections replace all-date graph collapse in the dated path; all-date behavior remains explicitly legacy.",
    "Retain all declared universe nodes in the dated path and report finite-pair coverage.",
    "Make the Louvain seed explicit for reproducibility; sensitivity analysis remains pending.",
    "Raw levels remain the faithful baseline; return/normalized-volume variants and bidirectional lag comparisons are separate research variants, not silent substitutions."
  ],
  "historical_data_status": "The notebook references total_dataset_.pickle. Original data recovery and historical universe/adjustment availability still require verification.",
  "claims": {
    "whole_notebook_executed": false,
    "original_historical_returns_reproduced": false,
    "full_network_detection_validated": false,
    "forecast_superiority_established": false
  }
}
