The past will make me feel nostalgic no matter how bad it might have been. I mean, it's ironic how I know right now that I'll be nostalgic about this moment although I don't feel like anything's special and nothing amazing is happening around me anyway.
To materialize the nostalgia with an example, I'd say I miss the years of 2010/2011 when I was really at the peak of my Internet presence and I was deep into gaming. I also miss 2009 when I was deep into the Internet and was discovering it. But I mostly miss the year of 2014 when I had my first love and is by far the happiest year in my entire life. I still remember places, songs, feelings, moments, dates, etc. Now that's gone, long gone, but I still walk around those places alone, listening to those songs, remembering anniversaries, moments, and attempting desperately, yet quietly, in my head, to recreate a present from those memories, yet it's impossible.
I guess nostalgia is built around moments when we were really happy, and we only feel nostalgic if whatever moment we're in isn't making us as happy as we used to be. That's why we are nostalgic about the childhood, because we were so young and naive and easier to make happy, and now we're too logical and everything can be explained and seen objectively that it's lost all its' magic. Technically, we're nostalgic of our own ignorance.