වෙළඳපොළ විශ්ලේෂණය සඳහා NLP — ප්‍රවෘත්ති සහ සමාජ හැඟීම් සැකසීම

ක්‍රිප්ටෝ වෙළඳාමේදී ස්වාභාවික භාෂා සැකසීම තීරණාත්මක වී ඇත. ප්‍රවෘත්ති නිවේදන, සමාජ මාධ්‍ය හැඟීම් සහ නියාමන කටපාඩම් වෙළඳපොළ චේතනාවලට පෙර ගෙන යයි. මෙම මගපෙන්වීම ඔබට අක්‍රමවත් පෙළෙන් ක්‍රියාත්මක බුද්ධිය උකහා ගන්නා ආකාරය පෙන්වයි — Smart Money API හි හැඟීම් ලකුණු කිරීමට බලය ලබා දෙන එම තාක්ෂණයන්ම.

ප්‍රධාන අවබෝධය: හැඟීම් පමණක් කෙටි කාලීන චලනයන්ගේ 48% පමණක් පුරෝකථනය කරයි. නමුත් එය තල්මසුන්ගේ එකඟතාවය සහ අරමුදල් අනුපාත සමඟ ඒකාබද්ධ කළ විට? හැඟීම් තහවුරු කළ වෙළඳාම් 61% නිරවද්යතාවයක් ලබා ගනී. එය බහු-මාදිලි සංඥාවල බලයයි.

හැඟීම් විශ්ලේෂණයේ පදනම්

වාග්කෝෂ-ආධාරිත එදිරිව යන්ත්‍ර ඉගෙනුම් ප්‍රවේශයන්

වාග්කෝෂ-ආධාරිත: ධනාත්මක/ඍණාත්මක වචන වල වාග්කෝෂය (VADER, TextBlob). වේගවත්, අර්ථකථනය කළ හැකි, නමුත් ව්‍යාංගය සහ සන්දර්භය සමඟ අපහසුතා ඇත.

Python — වාග්කෝෂ-ආධාරිත හැඟීම්
from nltk.sentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAnalyzer()
texts = [
"Bitcoin surged 15% on bullish institutional adoption news",
"Crash incoming — expect 40% dump based on fundrat neg",
"Mixed signals but whales are accumulating ETH"
]
for text in texts:
scores = analyzer.polarity_scores(text)
print(f"{text[:40]}... → {scores['compound']:.2f}")

Output: Compound scores range from -1 (most negative) to +1 (most positive). A score of 0.65 indicates positive sentiment, -0.42 indicates negative.

ML-based: Train classifiers (Naive Bayes, SVM) or use pre-trained transformers (BERT, RoBERTa). More accurate but requires labeled data.

ක්‍රිප්ටෝකරන්සි ප්‍රවෘත්ති සැකසීම

තත්පර-තත්පර ප්‍රවෘත්ති එකතු කිරීම

ප්‍රධාන මූලාශ්‍ර වලින් (CoinTelegraph, BlockBeats, Cointelegraph RSS, Reddit) ශීර්ෂ පෙළ ගන්න:

Python — ප්‍රවෘත්ති පයිප්ලයින්
import feedparser
from datetime import datetime, timedelta
# RSS feeds for crypto news
feeds = [
"https://cointelegraph.com/feed",
"https://www.coindesk.com/arc/outboundfeeds/rss/",
]
articles = []
for feed_url in feeds:
feed = feedparser.parse(feed_url)
for entry in feed.entries[:10]:
articles.append({
"title": entry.title,
"published": entry.published_parsed,
"summary": entry.summary,
})

ක්‍රිප්ටෝ වත්කම් සඳහා නාමික භාවිතා හඳුනා ගැනීම (NER)

එළිදරව් කරන්න කුමන ටෝකන/විනිමය ගැන සඳහන් කර ඇත්ද:

Python — ක්‍රිප්ටෝ සඳහා NER
import spacy
nlp = spacy.load("en_core_web_sm")
# Custom entity patterns for crypto
crypto_entities = {"Bitcoin", "BTC", "Ethereum", "ETH", "Solana", "SOL"}
text = "Bitcoin surged 12% as Ethereum whales accumulated large amounts"
doc = nlp(text)
for token in doc:
if token.text in crypto_entities:
print(f"{token.text} found")

සමාජ හැඟීම් පතල් කිරීම

Twitter/X API ඒකාබද්ධ කිරීම

නිශ්චිත වත්කම් සඳහා සඳහන් කිරීම්, හැඟීම් සහ සහභාගීත්වය ලුහුබැඳීම:

Python — Twitter හැඟීම් දහරාව
import tweepy
from transformers import pipeline
sentiment_pipeline = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
# Auth with Twitter API v2
client = tweepy.Client(bearer_token=TWITTER_BEARER)
# Search tweets about Bitcoin from last hour
query = "Bitcoin -is:retweet lang:en"
tweets = client.search_recent_tweets(query=query, max_results=100)
sentiments = []
for tweet in tweets.data:
result = sentiment_pipeline(tweet.text)[0]
sentiments.append({
"text": tweet.text,
"label": result["label"],
"score": result["score"]
})
avg_sentiment = sum(s["score"] for s in sentiments) / len(sentiments)
print(f"Bitcoin sentiment: {avg_sentiment:.2f}")

Reddit Community Sentiment

Monitor r/cryptocurrency, r/btc, r/ethtrader for retail sentiment shifts:

Python — Reddit sentiment
import praw
reddit = praw.Reddit(client_id=ID, client_secret=SECRET, user_agent=AGENT)
subreddit = reddit.subreddit("cryptocurrency")
# Get hot posts from last 24h
for post in subreddit.hot(limit=50):
if post.created_utc > (time.time() - 86400):
sentiment = sentiment_pipeline(post.title)[0]
# High upvotes + positive sentiment = strong retail bullish
signal_strength = post.score * sentiment["score"]

Building a Production Sentiment Engine

Transformer-Based Sentiment (BERT)

Pre-trained BERT models are far more accurate than lexicon-based approaches:

Python — BERT sentiment pipeline
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "ProsusAI/finbert" # FinBERT trained on financial news
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
def get_finbert_sentiment(text):
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
probabilities = torch.softmax(logits, dim=1)
# Returns: negative (0), neutral (1), positive (2)
sentiment_idx = torch.argmax(probabilities)
confidence = probabilities[0, sentiment_idx].item()
return {"sentiment": ["negative", "neutral", "positive"][sentiment_idx], "confidence": confidence}

Real-Time Sentiment Aggregation

Combine multiple signals into a daily sentiment score:

Python — Composite sentiment
def compute_daily_sentiment(symbol):
# 1. News sentiment (40% weight)
news_articles = fetch_recent_news(symbol)
news_sentiments = [get_finbert_sentiment(a["title"]) for a in news_articles]
news_score = np.mean([s["confidence"] for s in news_sentiments])
# 2. Twitter sentiment (35% weight)
tweets = fetch_tweets_last_6h(symbol)
twitter_sentiments = [get_finbert_sentiment(t) for t in tweets]
twitter_score = np.mean([s["confidence"] for s in twitter_sentiments])
# 3. Reddit sentiment (25% weight)
reddit_posts = fetch_reddit_hot(symbol)
reddit_sentiments = [get_finbert_sentiment(p) for p in reddit_posts]
reddit_score = np.mean([s["confidence"] for s in reddit_sentiments])
# Composite
composite = (news_score * 0.4 + twitter_score * 0.35 + reddit_score * 0.25)
return composite

Integrating with Smart Money API

Add sentiment as a feature to your confirmation system:

Python — Sentiment + Smart Money
def confirm_with_sentiment(symbol, direction):
# Smart Money තහවුරු කිරීම ලබා ගන්න
response = requests.get(
f"https://api.smartmoneyapi.com/v1/confirm?symbol={symbol}&direction={direction}",
headers={"X-API-Key": API_KEY}
)
smart_money = response.json()
# චේතනාව ලබා ගන්න
sentiment_score = compute_daily_sentiment(symbol)
# චේතනාව දිශාව සමඟ ගැලපේ නම් විශ්වාසය ඉහළ නංවන්න
if (direction == "long" and sentiment_score > 0.55):
boost = 0.05 # විශ්වාසයට +5%
elif (direction == "short" and sentiment_score < 0.45):
boost = 0.05
else:
boost = 0 # චේතනාව ප්‍රතිවිරුද්ධයි
final_composite = min(smart_money["composite"] + boost, 1.0)
return {"composite": final_composite, "sentiment_boost": boost}

උසස් NLP තාක්ෂණික ක්‍රම

අංශ-ආශ්‍රිත චේතනා විශ්ලේෂණය

සමස්ත චේතනාව වෙනුවට, විශේෂිත අංශ පිළිබඳ චේතනා උකහා ගන්න: "Bitcoin තාක්ෂණය විශිෂ්ටයි, නමුත් භාවිතය මන්දගාමීය." විශේෂාංග මට්ටමේ අදහස් උකහා ගන්න.

හේතු-ප්‍රතිඵල සොයා ගැනීම

හේතුමය ප්‍රකාශ හඳුනා ගන්න: "XYZ නිසා, මිල චලනය වේ." ප්‍රචාරක ප්‍රවෘත්ති මූලික ප්‍රවෘත්තිවලින් වෙන්කර හඳුනා ගැනීමට වර්ගීකාරකයක් පුහුණු කරන්න.

චේතනා කාල අනුක්‍රමය

කාලයත් සමඟ චේතනාවේ වෙනස්වීම් අධීක්ෂණය කරන්න. +0.65 සිට -0.45 දක්වා හදිසි වෙනසක් සලකා බැලිය යුතු ප්‍රතිලෝම සංඥාවකි.

චේතනාව Smart Money සංඥා සමඟ ඒකාබද්ධ කරන්න

Smart Money API තල්මසුන්ගේ එකඟතාවය සහ චේන් මෙට්‍රික්ස් සමඟ සත්‍යාපනය කරන ලද විශ්වාස ලකුණු සපයයි. ඔබේ වාසිය තහවුරු කිරීම සහ ජය අනුපාත 4-6% කින් ඉහළ නැංවීම සඳහා චේතනා විශ්ලේෂණය එක් කරන්න.

නොමිලේ ආරම්භ කරන්න →