Recent content by Jameson

  1. Jameson

    MathHelpBoards.com merges with PF

    I'm really happy that MHB could find a home here on PF! I have been a member here since I was in high school (I'm in my 30's now), and it definitely got me into forums and online communities in a way that I don't think I would have otherwise. PF is unique compared to the handful of other math...
  2. Jameson

    Introducing Math Problem of the Week

    I'm so happy that @anemone and @Euge continue on their great work here at PF. Seeing how many people just respond to this announcement makes me smile. A community needs members of all sorts to thrive - those who ask, those who help, those who coordinate, those who lurk. :smile: PF looks to have...
  3. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    I would recommend not partitioning this way, although it's not a bad idea. I think it's most stable and more common to do it this way. I'd do it like this. train_size = 0.8 train_end = int(len(df)*train_size) df_train = df[:train_end] df_test = df[train_end:]
  4. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    Nice! The way I would check for better is for your test timeframe (not the training timeframe) take the predicted vs. actual for each day then average them across all days. Then you can use a number of metrics, but commonly Mean Absolute Error, Root Mean Squared Error, or Mean Absolute...
  5. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    If you want to calculate the 200 day average you need 200 datapoints, so the first 199 rows won't have a value. For 7 day average, rows 1-6 won't. To deal with this usually we can start training the model after these values have had time to populate. You could start training your model in...
  6. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    Sure, try 200 if that's what you think could be useful. :) Hmm, maybe try this? f['rolling_200_day_avg'] = df.rolling['Close'](200).mean()
  7. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    Looks good so far. I would use the rolling method from pandas. From your screenshot you can type in: df['rolling_7_day_avg'] = df.rolling(7).mean()
  8. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    That really all depends on the scenario or the assignment. You could make a model for hour, daily, weekly, or monthly. Usually it would be hourly or daily though in my experience. If you are trying to forecast the stock price for tomorrow then I would try daily first. You will need to make...
  9. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    5 years isn't necessary but it's a good length. For annual time series models it's good to have at least 2 full years to observe the entire cycle multiple times. If you only have 6 months for example, it's very likely the model will not forecast well for the other 6 months of the year not seen...
  10. Jameson

    MHB Neural Networks : Which stock has the biggest increase ?

    Trying to forecast stock movement is the ultimate problem of financial markets. It isn't possible without some extreme niche scenario and proprietary data (in my opinions and from everyone I know who works in this field). This problem has some great qualities that we want when modeling: a huge...
  11. Jameson

    Python - Endpoint : Can the function not return an array of dictionaries ?

    I think so unfortunately. Here are the types that the JSON format can work with and it looks like pandas has default behavior to use int64 and float64. You could write a function to loop over your columns and column types and convert any int64 dtypes to int as well as float64 to float.
  12. Jameson

    Python - Endpoint : Can the function not return an array of dictionaries ?

    I had to look this up but I found a couple threads on StackExhange which reference this error and they both say that this is due to the int64 type. That is a numpy type, so the fix seems to be converting it to a Python int before dumping to JSON. I would try modifying your function to something...
  13. Jameson

    MHB What is the difference between GET vs POST vs PUT? Mainly POST vs PUT?

    This is not my speciality and I didn't really know about PUT before this question, but it seems that PUT is used to check if a resource exists and POST always creates a new resource. It also seems to me that repeated POST requests with the same payload will create new records each time, and PUT...
  14. Jameson

    MHB Proving Properties of 2x2 Matrices

    Hi and welcome to MHB! What have you tried for each of these? Which one would you like to start with?
  15. Jameson

    MHB Pb.20 What is the probability that Hiroko....will be chosen

    Hi karush! Part of me wants this problem to be more complicated than it seems, but I agree with you that it should be (e). There are 32 valid options to choose from at random, so 1/32 of a single person being chosen from that pool.
Back
Top