Getting column with days from first observed – trading data

So i have some Trading data, and ultimately i would like to find 1 week return 1 month, 3 month and so on. To do this i think it is easiest if i can get a column with days existed for each asset. Data is simplified to this: Id Date Price 101 2014-09-14 0.7 101… Read More Getting column with days from first observed – trading data

Unable to retrieve multiple values from database

The following data exists in the database: [ { "_id": { "$oid": "628c787de53612aad30021ab" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030000", "open": "1.12161", "high": "1.12209", "low": "1.12161", "close": "1.12209", "vol": "561", "id": 1 }, { "_id": { "$oid": "628c787de53612aad30021ac" }, "ticker": "EURUSD", "dtyyyymmdd": "20030505", "time": "030100", "open": "1.12206", "high": "1.1225", "low": "1.12206", "close": "1.1225", "vol": "1223",… Read More Unable to retrieve multiple values from database

How to keep the image static and the first element temporarily flexed

.game__feature__block { transition: 1s; flex: 1; padding: 15px; border: 1px solid #e40e0e; background-position: 50% 0%; background-size: contain; background-repeat: no-repeat; box-shadow: 0 0 20px -4px #000, inset 0 0 0 5px #200607; text-align: center; } .game__feature__block:hover{ flex: 2; } .container { width: 100%; max-width: 1480px; margin-right: auto; margin-left: auto; padding-right: 10px; padding-left: 10px; } <html> <div… Read More How to keep the image static and the first element temporarily flexed

I am trying to do projection with simple subtract function but I am receiving error on $subtract mongodb can't $subtract string from string

I am trying to do subtract on mongodb but I am facing formatting issue [{$match: { StrategyStatus: 1 }}, {$project: { TradingPair: 1, BotName: 1, TotalFees: 1, CapitalAmount: 1, TotalRealisedProfit: 1, PureProfit: { $subtract: [ ‘$TotalRealisedProfit’, ‘$TotalFees’ ] } }}] I am tring to execute this query on MongoDB Compass The error that I am… Read More I am trying to do projection with simple subtract function but I am receiving error on $subtract mongodb can't $subtract string from string

How to fix the error ? IndentationError: unexpected indent?

I was trying to run the code from : https://medium.datadriveninvestor.com/the-supertrend-implementing-screening-backtesting-in-python-70e8f88f383d but when it came to this block I saw that there was an error that i’ve not been able to fix. It shows IndentationError: unexpected indent. How to fix this? def find_optimal_parameter(df): # predefine several parameter sets atr_period = [7, 8, 9, 10] atr_multiplier =… Read More How to fix the error ? IndentationError: unexpected indent?