OHLC.dev editorialIDX

Stock Market Analysis System Using Smart Money Flow Accumulation and Pump Dump Detection

The behavior of large market participants plays an important role in stock price movements. Institutional investors and high-capital traders often create significant market impa...

September 5, 20268 min readRafatar
Stock Market Analysis System Using Smart Money Flow Accumulation and Pump Dump Detection

The behavior of large market participants plays an important role in stock price movements. Institutional investors and high-capital traders often create significant market impact through accumulation and distribution activities. Therefore, identifying smart money behavior can provide additional information for investors in evaluating market conditions.

This project develops a Bandar Intelligence Analyzer, an API-based stock market analysis system designed to detect potential accumulation activity, smart money movement, and pump-dump risk.

The system integrates three major analysis components:

  1. Accumulation Analysis

  2. Smart Money Flow Analysis

  3. Pump-Dump Detection

The system retrieves market analysis data through API requests, processes the response data, converts the information into structured data format, and generates an interpretation signal.

The final output provides an investor-oriented interpretation, including accumulation status, smart money direction, pump-dump risk level, and overall market signal.


1. Introduction

Stock market movements are influenced by multiple factors, including company fundamentals, market sentiment, trading volume, and the activity of large market participants.

One important approach in market behavior analysis is identifying the movement of smart money, which refers to investors with significant capital and market influence.

Large investors usually do not execute their positions randomly. Their activities may appear through specific market patterns, such as:

  • gradual accumulation,

  • increasing trading activity,

  • changes in money flow direction,

  • distribution after significant price movement.

However, identifying these patterns manually can be difficult because market data is complex and continuously changing.

To overcome this challenge, this project develops an automated analysis system called:

Bandar Intelligence Analyzer

The system collects market behavior data through API integration and analyzes three main components:

  • accumulation behavior,

  • smart money flow,

  • pump-dump risk.

The objective of this system is not to predict stock prices directly, but to provide additional information regarding market participant behavior.


2. System Overview

The developed system consists of five processing stages:

Market API
    |
    ↓
API Configuration
    |
    ↓
Data Retrieval
    |
    ↓
Data Processing
    |
    ↓
Signal Interpretation
    |
    ↓
Investor Analysis Report

The system retrieves three analysis datasets:


  1. Accumulation Analysis


  2. Smart Money Analysis


  3. Pump-Dump Analysis

The original implementation retrieves these datasets using API endpoints:

/api/analysis/bandar/accumulation

/api/analysis/bandar/smart-money

/api/analysis/bandar/pump-dump


3. Development Environment

The system is developed using Python with several supporting libraries.

Libraries used:

Library

Function

requests

API communication

pandas

Data processing

json

JSON response handling

The system uses RapidAPI as the data provider.


4. System Implementation

Cell 1 — Import Library & API Configuration

Source Code

# -*- coding: utf-8 -*-
"""accumulation smart money pump-dump.ipynb

Automatically generated by Colab.

Original file is located at
    https://colab.research.google.com/drive/1KjBTbLZ5pghCslGmMsHz06xbBVBXlpmz

Cell 1 — Import Library & API Configuration
"""


import requests
import pandas as pd
import json


API_HOST = "indonesia-stock-exchange-idx.p.rapidapi.com"


HEADERS = {
    "Content-Type": "application/json",
    "x-rapidapi-host": API_HOST,
    "x-rapidapi-key": "YOUR_RAPIDAPI_KEY"
}


BASE_URL = "https://indonesia-stock-exchange-idx.p.rapidapi.com"


symbol = "BUMI"

days = 7


Explanation

The first cell prepares the basic configuration required for API communication.

The system imports three Python libraries:

1. Requests

The requests library is used to send HTTP requests to the API server.

2. Pandas

The pandas library is used later for converting API responses into structured tables.

3. JSON

The json library handles API responses in JSON format.


The API configuration consists of:

API Host

API_HOST

Defines the RapidAPI service address.


Header Authentication

HEADERS

Contains:

  • content type,

  • API host,

  • API authentication key.

This header is required to access the stock market analysis service.


Base URL

BASE_URL

Stores the main API endpoint.


Stock Parameter

symbol = "BUMI"

Defines the stock code that will be analyzed.

In this example, the system analyzes:

BUMI

Analysis Period

days = 7

Defines the analysis period used by the system.

The system retrieves market behavior data based on the selected timeframe.


Cell 2 — Function Request API

Source Code

"""Cell 2 — Function Request API"""


def get_bandar_analysis(endpoint, symbol, days=7):

    url = f"{BASE_URL}{endpoint}/{symbol}?days={days}"


    response = requests.get(
        url,
        headers=HEADERS
    )


    if response.status_code == 200:

        return response.json()

    else:

        print("Error:", response.status_code)

        print(response.text)

        return None


Explanation

Cell 2 creates a reusable function called:

get_bandar_analysis()

This function is responsible for handling communication between the Python application and the API server.


The function receives three parameters:

1. Endpoint

endpoint

Defines which analysis module will be accessed.

Example:

/api/analysis/bandar/accumulation

2. Symbol

symbol

Defines the stock code.

Example:

BUMI

3. Days

days

Defines the analysis period.

Example:

7 days

The function creates the complete API URL:

url = f"{BASE_URL}{endpoint}/{symbol}?days={days}"

Then the system sends a GET request:

requests.get()

using the configured API header.


If the API response is successful:

response.status_code == 200

the function returns JSON data:

return response.json()

If the request fails, the system displays:

  • error status code,

  • API response message.

This approach makes the API retrieval process reusable for multiple analysis modules.


Cell 3 — Retrieve All Bandar Analysis Data

Source Code

"""Cell 3 — Retrieve All Bandar Data"""


# Get Accumulation Analysis

accumulation = get_bandar_analysis(
    "/api/analysis/bandar/accumulation",
    symbol,
    days
)


# Get Smart Money Analysis

smart_money = get_bandar_analysis(
    "/api/analysis/bandar/smart-money",
    symbol,
    days
)


# Get Pump Dump Analysis

pump_dump = get_bandar_analysis(
    "/api/analysis/bandar/pump-dump",
    symbol,
    days
)



print("Accumulation")

print(
    json.dumps(
        accumulation,
        indent=2
    )
)



print("\nSmart Money")

print(
    json.dumps(
        smart_money,
        indent=2
    )
)



print("\nPump Dump")

print(
    json.dumps(
        pump_dump,
        indent=2
    )
)


Explanation

This cell retrieves three main market analysis datasets from the API:

  • Accumulation Analysis to identify potential buying activity.

  • Smart Money Analysis to evaluate capital flow direction.

  • Pump-Dump Analysis to measure speculative risk.

The API responses are stored in JSON format and prepared for further processing.


Cell 4 — Convert JSON Result into DataFrame

Source Code

"""Cell 4 — Convert JSON Result into DataFrame"""


def json_to_df(data, name):

    try:

        df = pd.DataFrame(data)

        df["source"] = name

        return df

    except:

        return pd.DataFrame([data])





# Convert Accumulation Data

df_acc = json_to_df(
    accumulation,
    "Accumulation"
)



# Convert Smart Money Data

df_sm = json_to_df(
    smart_money,
    "Smart Money"
)



# Convert Pump Dump Data

df_pd = json_to_df(
    pump_dump,
    "Pump Dump"
)



display(df_acc)

display(df_sm)

display(df_pd)


Explanation

This cell converts the API JSON responses into Pandas DataFrames.

The conversion process improves data readability and allows easier inspection of:

  • accumulation indicators,

  • smart money information,

  • pump-dump risk parameters.

Three DataFrames are generated:

  • df_acc

  • df_sm

  • df_pd


Cell 5 — Simple Bandar Signal Analyzer

Source Code

"""Cell 5 — Simple Bandar Signal Analyzer"""


# ==========================
# FINAL BANDAR INTERPRETATION
# ==========================

print("\n"+"="*60)
print("📌 KESIMPULAN BANDAR")
print("="*60)



acc_data = accumulation.get("data", {})

sm_data = smart_money.get("data", {})

pd_data = pump_dump.get("data", {})



acc_status = acc_data.get("status")

acc_score = acc_data.get("accumulation_score")



sm_flow = sm_data.get("flow_direction")



pd_status = pd_data.get("status")

risk_score = pd_data.get("risk_score")



print(f"\nSymbol : {symbol}")





# Accumulation

print("\n🟢 Accumulation")


if acc_status == "BULLISH":

    print("Status : AKUMULASI")


elif acc_status == "NEUTRAL":

    print("Status : NETRAL")


else:

    print("Status :", acc_status)



print("Score :", acc_score)





# Smart Money

print("\n💰 Smart Money")


print("Flow :", sm_flow)



if sm_flow == "INFLOW":

    print("Status : Smart Money Masuk")


elif sm_flow == "OUTFLOW":

    print("Status : Smart Money Keluar")


else:

    print("Status : Neutral")





# Pump Dump

print("\n⚠️ Pump Dump")


print("Status :", pd_status)

print("Risk Score :", risk_score)





# Final Decision

print("\n"+"-"*60)



if (

    acc_status == "BULLISH"

    and sm_flow == "INFLOW"

    and pd_status == "SAFE"

):

    final_signal = "STRONG ACCUMULATION"



elif (

    sm_flow == "OUTFLOW"

    or acc_status == "DISTRIBUTION"

):

    final_signal = "WAIT / HOLD"



else:

    final_signal = "WATCHLIST"





print("FINAL SIGNAL :", final_signal)





# Explanation

print("\nAnalisa:")



if acc_status == "DISTRIBUTION":

    print("- Bandar menunjukkan distribusi")



if sm_flow == "OUTFLOW":

    print("- Smart money masih melakukan pelepasan")



if pd_status == "SAFE":

    print("- Tidak ada indikasi pump dump aktif")





print("\nEntry Ideal :", acc_data.get("entry_zone"))

print("Risk Level :", acc_data.get("risk_level"))


Explanation

This cell performs the final market interpretation by combining the three analysis results.

The system evaluates:

  • Accumulation status and score

  • Smart money flow direction

  • Pump-dump status and risk score

Based on these indicators, the system generates a final signal:

  • STRONG ACCUMULATION

  • WAIT / HOLD

  • WATCHLIST

This step converts raw API data into a simplified investor-oriented market interpretation.



Conclusion

This project successfully developed a Bandar Intelligence Analyzer system for stock market behavior analysis by integrating three main indicators: Accumulation Analysis, Smart Money Flow Analysis, and Pump-Dump Risk Detection.

The system utilizes API-based data retrieval to collect market behavior information and process it into structured analysis results. The implementation consists of five main stages: API configuration, API request processing, data retrieval, data transformation, and final signal interpretation. The system retrieves accumulation, smart money, and pump-dump datasets through dedicated analysis endpoints and combines the information to generate an overall market assessment.

The Accumulation Analysis module provides information regarding potential buying activity by evaluating accumulation status and score. This indicator helps identify whether a stock shows signs of accumulation, neutral movement, or distribution pressure.

The Smart Money Flow Analysis module evaluates the direction of capital movement by identifying whether large investors are entering or leaving a stock. Smart money inflow may indicate increasing buying interest, while smart money outflow may indicate potential selling activity.

The Pump-Dump Detection module provides additional risk evaluation by identifying potential speculative price movements. This module helps distinguish between healthy accumulation and abnormal market movements.

The final analysis combines these indicators to generate simplified investor signals, including Strong Accumulation, Wait/Hold, and Watchlist. The decision process evaluates the relationship between accumulation status, smart money direction, and pump-dump risk level before generating the final interpretation.

Although the system provides valuable insights into market participant behavior, the generated signals should not be considered as automatic buy or sell recommendations. The analysis should be supported by additional evaluation methods, including company fundamentals, financial performance, valuation analysis, market conditions, and other technical indicators.

Overall, the Bandar Intelligence Analyzer demonstrates the potential of API-based data processing combined with rule-based analysis to support stock market decision-making. The system can assist investors in monitoring accumulation patterns, identifying smart money movements, and evaluating market risks in a more structured and efficient way.