Yoel125/Assignment_1_EDA
收藏资源简介:
# Bitcoin (BTC) Price Action & Technical Indicators Analysis <div align="center"> <h1>Video Presentation</h1> <video controls width="100%"> <source src="https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/resolve/main/presentation.video.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </div> ## Project Overview This research analyzes the "Multi-Model Trading Data" dataset, which consists of Bitcoin (BTC) historical trading data. this data set haves 7.26K rows and 18 columns. The Goal: To investigate the direct relationship between Bitcoin’s Price Movements and key technical indicators (Volume ,RSI, MACD, and Stoch RSI) to understand how market momentum and trend-reversal patterns correlate with actual price changes. ### source: https://huggingface.co/datasets/AdityaaXD/Multi-Model-Trading-Data # Feature Selection : Price Dynamics: open, high, low, close Performance Metrics: volume, returns Technical Indicators: RSI (Momentum), stoch_rsi_d (Sensitivity), MACD (Trend Confirmation) Timeline: date # Data Cleaning & Decision Making Feature Selection: first i isolated 10 core columns essential for technical analysis (e.g., Price, Volume, and Timestamp). This step served as a form of Dimensionality Reduction, ensuring our analysis focused only on relevant features. Data Filtering: Following the feature selection process, I performed targeted row filtration on the columns that contained approximately 50% missing values. This step was strategically executed after the column selection to ensure that only relevant data was prioritized, preventing the unnecessary deletion of records based on non-essential features. Final Cleaning: Following the initial thresholding, all remaining null values were dropped to provide a high-fidelity dataset for calculating oscillators and trend-lines. Detection: utilized the Interquartile Range (IQR) to identify statistical anomalies in price and returns. Decision: I made the decision to retain all outliers. Justification: In the Bitcoin market, extreme price movements are rarely measurement errors; they represent significant market shifts and high-volatility regimes. Preserving these points is essential for our EDA, as it allows us to analyze how indicators like RSI and MACD behave during "Black Swan" events or periods of rapid price discovery. Removing them would sanitize the data to the point of losing its most valuable information. # Research Questions & Insights: ## Main Research Question: To what extent do technical indicators (RSI, MACD, Stoch RSI) reflect Bitcoin's price movements? ## Key Findings & Analysis: ### How do price anomalies (Outliers) behave over time?  The visualizations show that price outliers are not random noise. They appear in clusters, coinciding with major historical price rallies and crashes. This suggests that price movements follow structural volatility patterns. ### Is there a linear relationship between Volume and Price Returns?  Through Correlation Analysis, we can observe a weak linear relationship (flat regression line). This confirms that volume alone does not dictate price direction, which is why we turned our focus to technical indicators. ### How does Bitcoin's price behave when the RSI reaches "Overbought" or "Oversold" levels?  The visualization demonstrates a high correlation between Bitcoin’s price action and the RSI oscillator. Historically, RSI levels above 70 (Overbought) often precede a price correction or consolidation, while levels below 30 (Oversold) suggest a potential local bottom and subsequent price recovery. However, this relationship is not deterministic; during strong trending periods, the RSI can remain in extreme zones while the price continues its momentum, indicating that RSI should be analyzed alongside other features for higher predictive accuracy. ## Does the Stoch RSI identify price reversals faster than the standard RSI due to its aggressive movement?  The analysis indicates that the Stoch RSI exhibits high sensitivity to Bitcoin's price movements compared to the standard RSI. While both indicators follow price trends, the Stoch RSI reacts more aggressively, reaching overbought or oversold thresholds significantly faster. This suggests that while Stoch RSI can identify potential reversals earlier, it may also introduce more 'noise' (false signals) during periods of high volatility, whereas the standard RSI provides a more filtered and stable trend confirmation. ## Is there a correlation between MACD trend-line crossovers and major price breakouts?  The visualization demonstrates that MACD Zero-line crossovers serve as significant indicators for identifying shifts in Bitcoin's price trajectory. The analysis shows that when the MACD line crosses above the zero-threshold, it signals a transition into a bullish regime, often acting as a precursor to a sustained price increase. Conversely, a crossover below the zero line indicates a shift toward bearish momentum. While the MACD is inherently a lagging indicator, the data confirms a strong correlation between these crossover events and the initiation of major price breakouts, making it a reliable feature for trend confirmation within this specific dataset. # Summary & Research Insights 1.Price Outliers & Trends: In our first graph, we found that the price outliers (the red dots) aren't random. They usually appear in groups during big market crashes or huge jumps (what we call volatility clustering). We decided to keep these outliers because they represent real, important market events that the model needs to learn. 2.Trading Volume: We checked if volume can predict price moves using a scatter plot. The regression line was flat, which proves that trading volume alone isn't enough to tell us where the price is going. This is why we need more advanced indicators. 3.The Indicators (RSI, Stoch RSI, MACD): Looking at the graphs, we saw that each indicator gives us a different piece of the puzzle: RSI: Perfect for seeing when Bitcoin is "Overbought" or "Oversold." Stochastic RSI: Much more aggressive and fast. it gives us "early warnings" before the regular RSI even moves. MACD: The crossovers are the best signal for confirming a new price breakout or a change in trend. # Final Conclusion The EDA process successfully "told the story" of Bitcoin's price dynamics. We concluded that price movements are more closely correlated with momentum shifts and trend confirmations (as captured by MACD and RSI) than with simple volume spikes. ## **📂 Project Files & Deliverables** | File | Description | Link | | --- | --- | --- | | `_Assigment_1_EDA.csv` | Cleaned BTC Dataset | [View File](https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/blob/main/_Assigment_1_EDA.csv) | | `_Assignment_1_EDA_&_Dataset_5.ipynb` | Full Analysis Notebook | [View Notebook](https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/blob/main/_Assignment_1_EDA_%26_Dataset_5.ipynb) |
# 比特币(Bitcoin, BTC)价格行为与技术指标分析 <div align="center"> <h1>演示视频</h1> <video controls width="100%"> <source src="https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/resolve/main/presentation.video.mp4" type="video/mp4"> 您的浏览器不支持视频播放标签。 </video> </div> ## 项目概述 本研究针对“多模型交易数据集”展开分析,该数据集包含比特币(Bitcoin, BTC)的历史交易数据。 该数据集共7.26千条记录,包含18个字段。 研究目标:探究比特币价格波动与核心技术指标(成交量、相对强弱指数(RSI)、移动平均收敛散度(MACD)、随机相对强弱指数(Stoch RSI))之间的直接关联,以厘清市场动量与趋势反转模式如何与实际价格变化产生关联。 ### 数据来源: https://huggingface.co/datasets/AdityaaXD/Multi-Model-Trading-Data ## 特征选择 价格动态指标:开盘价(open)、最高价(high)、最低价(low)、收盘价(close) 性能指标:成交量(volume)、收益率(returns) 技术指标:RSI(动量指标)、stoch_rsi_d(灵敏度指标)、MACD(趋势确认指标) 时间维度:日期(date) ## 数据清洗与决策制定 ### 特征筛选: 首先提取出10个用于技术分析的核心字段(例如价格、成交量与时间戳),此步骤属于降维操作,确保分析仅聚焦于相关特征。 ### 数据过滤: 完成特征筛选后,针对存在约50%缺失值的字段执行针对性行过滤。该步骤在列筛选完成后执行,确保仅优先处理相关数据,避免因非必要特征而误删有效记录。 ### 最终清洗: 初始阈值处理完成后,删除所有剩余的空值,以得到用于计算震荡指标与趋势线的高质量数据集。 ### 异常值检测: 采用四分位距(Interquartile Range, IQR)识别价格与收益率的统计异常值。 ### 决策: 最终决定保留所有异常值。 ### 合理性说明: 在比特币市场中,极端价格波动极少属于测量误差,而是代表重大市场转变与高波动区间。保留这些异常值对于探索性数据分析(Exploratory Data Analysis, EDA)至关重要,可帮助我们分析RSI、MACD等指标在“黑天鹅”事件或快速价格发现阶段的表现。若移除这些异常值,会导致数据被过度净化,丢失最具价值的信息。 ## 研究问题与核心发现 ### 核心研究问题: 技术指标(RSI、MACD、Stoch RSI)在多大程度上能够反映比特币的价格波动? ### 关键发现与分析: #### 价格异常值(异常点)随时间的变化规律如何?  可视化结果显示,价格异常值并非随机噪声,而是以集群形式出现,与历史上重大价格暴涨暴跌时段重合。这表明价格波动遵循结构化的波动聚集模式。 #### 成交量与价格收益率之间是否存在线性关联?  通过相关性分析可见,二者仅存在微弱的线性关联(回归曲线近乎平缓)。这证实仅依靠成交量无法决定价格走向,因此我们将分析重心转向技术指标。 #### 当RSI进入“超买”或“超卖”区间时,比特币价格会呈现何种表现?  可视化结果表明,比特币价格行为与RSI震荡指标存在高度相关性。历史数据显示,RSI高于70(超买区间)通常预示价格回调或盘整;而RSI低于30(超卖区间)则暗示存在局部低点,后续大概率出现价格反弹。不过该关联并非确定的因果关系:在强劲趋势行情中,RSI可能长期处于极端区间,但价格仍会延续原有动量,这说明需结合其他特征共同分析RSI,才能提升预测准确性。 #### 相较于标准RSI,Stoch RSI是否能更快识别价格反转信号(因其波动更为剧烈)?  分析表明,相较于标准RSI,Stoch RSI对比特币价格波动的敏感度更高。尽管两类指标均能跟随价格趋势,但Stoch RSI反应更为剧烈,能更快触及超买或超卖阈值。这意味着尽管Stoch RSI可更早识别潜在反转信号,但在高波动时段也可能引入更多“噪声”(虚假信号);而标准RSI则能提供更为过滤且稳定的趋势确认信号。 #### MACD趋势线穿越零轴事件与重大价格突破是否存在关联?  可视化结果显示,MACD零轴穿越事件可作为识别比特币价格轨迹转变的重要指标。分析表明,当MACD线上穿零阈值时,标志着市场转入多头区间,通常是持续价格上涨的前兆;反之,当MACD线下穿零轴时,则预示市场转向空头动量。尽管MACD本质属于滞后指标,但本数据集的数据证实了此类穿越事件与重大价格突破启动之间存在强相关性,使其成为该数据集内可靠的趋势确认特征。 ## 总结与研究洞察 1. **价格异常值与趋势**: 在首幅图表中我们发现,价格异常值(红点)并非随机分布,而是多集中出现于重大市场崩盘或暴涨时段(即所谓的波动聚集现象)。我们决定保留这些异常值,因为它们代表了模型需要学习的真实且重要的市场事件。 2. **成交量**: 我们通过散点图验证了成交量能否预测价格走势,结果显示回归曲线近乎平缓,证实仅依靠交易成交量不足以判断价格走向,这也是我们需要借助更高级技术指标的原因。 3. **技术指标(RSI、Stoch RSI、MACD)**: 通过图表分析可见,各类指标可提供不同维度的市场信息: - RSI:适用于识别比特币的“超买”或“超卖”状态。 - 随机相对强弱指数(Stoch RSI):反应更为快速灵敏,可在标准RSI出现变动前发出“早期预警”。 - MACD:其零轴穿越信号是确认价格突破或趋势转变的最佳指标。 ## 最终结论 本次探索性数据分析(EDA)完整呈现了比特币价格动态的变化规律。我们得出结论:相较于单纯的成交量激增,价格波动与动量转变及趋势确认(由MACD与RSI捕捉)的关联更为紧密。 ## 📂 项目文件与交付成果 | 文件名称 | 描述 | 链接 | | --- | --- | --- | | `_Assigment_1_EDA.csv` | 清洗后的比特币数据集 | [查看文件](https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/blob/main/_Assigment_1_EDA.csv) | | `_Assignment_1_EDA_&_Dataset_5.ipynb` | 完整分析笔记 | [查看笔记](https://huggingface.co/datasets/Yoel125/Assignment_1_EDA/blob/main/_Assignment_1_EDA_%26_Dataset_5.ipynb) |



