+ Reply to Thread
Results 1 to 1 of 1

Calculate Top Bounce Back and Top Pull Back instead of Top Gainers and Top Losers

  1. #1
    Forum Contributor
    Join Date
    11-29-2014
    Location
    India
    MS-Off Ver
    MS Excel 2007
    Posts
    240

    Calculate Top Bounce Back and Top Pull Back instead of Top Gainers and Top Losers

    Hello Friends,

    This is going to be difficult. I tried my best but wasn't successful and it will be little difficult for me to explain my desired output. However, I will try my best.

    In stock market, there is something called as Top Gainers and Top Losers that shows top stocks that performed best and worst. While calculating, the gain and loss percentage, it considers previous day's close price and today's close price when the market closes.

    I want a similar data but change in calculation. Instead of considering previous and current day's close, it should consider current day's high and low. I need to find out how much percentage the stock rose from its day low (Top Bounce Back) and how much percentage the stock fell from its day high (Top Pull Back).

    Purpose is to find out the best timeframe with highest percentage. To do this, my logic is to read the first data from the "raw.csv" file and record low and high and calculate percentage rise. and then iterate through each row of that particular stock to find if the percentage was higher than before. Keep iterate through the end of the row of that particular stock to find the best time frame where the percentage is highest. Do it for all stock and dump the result in TopBounceBack.csv. In this we were checking percentage increase from low to high. Do a similar exercise to find out percentage increase from high to low and dump result in TopPullBack.csv. I hope I have explained my problem correctly.

    For better understanding, I am attaching 3 files where I calculated the result by doing manual work.
    raw.csv = it has sample data for four stocks
    TopBounceBack.csv = it has the desired output for performing stocks
    TopPullBack = it has the desired output of worst stock

    After trying much when i failed, I processed raw.csv file manually and came up with the next two desired output csv files. I thought, while doing it manually, I can get a logic but I failed.

    Appreciate some help. Kindly help me with a code that can output csv files as per desired results.

    Thank you

    EDIT: I have added the purpose in my question.
    Attached Files Attached Files
    Last edited by sabha; 04-23-2023 at 03:06 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to calculate average for back to back non-empty cells
    By kathyy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-30-2022, 11:23 AM
  2. Replies: 3
    Last Post: 08-30-2022, 11:22 AM
  3. vlookup - bring back blank cell when it brings back 0 and N/A
    By julee.stein in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2018, 11:12 AM
  4. Team Generator Kids Soccer - no back to back play
    By EWolfe in forum Excel General
    Replies: 2
    Last Post: 05-15-2017, 10:51 PM
  5. Replies: 9
    Last Post: 08-07-2016, 09:45 PM
  6. Replies: 1
    Last Post: 03-11-2015, 07:27 AM
  7. [SOLVED] Counting Number of Times a Value is Repeated REPEATEDLY (Back to Back)
    By patrickfshield in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-06-2012, 04:45 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1