Who can solve this project of Python Finance (Bitcoin) ??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Who can solve this project of Python Finance (Bitcoin) ???

In this project we will analyze Bitcoin prices, calculate the investment values, and analyze return rates. This project will involve multiple steps, with each step requiring a number of tasks to accomplish. We will start with easy tasks using static data, and progress to more advanced tasks that use real data we will obtain from the web. By the end of the project, we will be able to fetch Bitcoin’s real price, and analyze and create charts based on its historic values. Let's get started! The given code includes an array that identifies Bitcoin's price as of January 1 of each year between 2018-2021. Create a program to calculate and output the standard deviation of the price values.

26th Oct 2021, 7:16 PM
Niloufar Kashanian
Niloufar Kashanian - avatar
9 Answers
+ 6
Niloufar Kashanian , to get useful help from the community,  we need to see your attempt first. without having seen your code, it is difficult to find out where the issue is. => please put your code in playground and link it here thanks!
26th Oct 2021, 7:26 PM
Lothar
Lothar - avatar
+ 3
Lothar import numpy as np import numpy_financial as npf #price for 2018-2021 bitcoin = [3869.47, 7188.46, 22203.31, 29391.78]
26th Oct 2021, 7:29 PM
Niloufar Kashanian
Niloufar Kashanian - avatar
+ 2
import numpy as np import numpy_financial as npf #price for 2018-2021 bitcoin = [3869.47, 7188.46, 22203.31, 29391.78] res = np.std(bitcoin ) print (res)
22nd Mar 2022, 10:38 PM
Asma
+ 2
import numpy as np import numpy_financial as npf #price for 2018-2021 bitcoin = [3869.47, 7188.46, 22203.31, 29391.78] #initial investment $500k myarray = [-500000] # 10 bitcoin per year for i in bitcoin: myarray.append(i*10) #the result print(npf.irr(myarray))
5th Feb 2023, 7:25 AM
Hamid Reza Akbari
Hamid Reza Akbari - avatar
+ 1
🤔🤔
26th Oct 2021, 7:17 PM
Niloufar Kashanian
Niloufar Kashanian - avatar
+ 1
The solution is practically given to you in the highlighted box: "Use the np.std() function with the array as an argument to calculate the standard deviation." One more line will complete the code.
26th Oct 2021, 7:41 PM
Brian
Brian - avatar
0
You can't just come up with a bitcoin price, You need to have some code that grabs it from an updating web source. Look into beautifulsoup library. You can pull direct prices from any bitcoin price watcher.
26th Oct 2021, 7:34 PM
Slick
Slick - avatar
0
چه کار میخوای بکنی من بلدم بگو تا حل کنم
20th Jan 2022, 9:16 AM
Yousef Ahmadi
Yousef Ahmadi - avatar
- 1
Niloufar Kashanian check your private messages, the solution is there. good luck :-) happy coding
30th Nov 2021, 7:20 PM
Mihaly Nyilas
Mihaly Nyilas - avatar