The performance of certain types of books, much like certain types of financial instruments, is cyclical. Vampires were cool in the middle of the last decade (and are still cool to some extent). Is this the first time this has happened? Absolutely not. (I mean, who doesn't remember the vampire riots of the 1720s/1730s?) Is this the last time this has happened? Also absolutely not.
We're probably at the tail end of all this vampire business. This means you can either 1.) focus on writing something else, or 2.) write your vampire novel(s) anyway and hope those angsty blood-chuggers become cool again sometime soon.
Note: a lot of nonfiction titles are dependent on the news cycle. As stories break, people want to learn more about the issues being discussed. Where do they go for that? Well, the Internet. But also books.
Inexperienced participants often make the mistake of buying high and selling low. I've said this before, but if you notice, say, paranormal Amish bromance* is suddenly huge and you want in on the action, you're probably already too late to the party. By the time you get your book written, sold, and published—roughly a year to eighteen months later at the very, very best—there's no guarantee that the genre will still be popular.
On the other hand, some people won't write in a particular genre or category because said genre or category hasn't sold in forever. That's fine, but you should always be aware that today's Huge Trend™ was under everyone's radar yesterday. (Not that I expect poetry sales to magically take off OH WAIT THAT IS SORT OF HAPPENING**.) Which leads me to my next point:
To succeed, you have to do your homework. This entails knowing the fundamentals as well as actively searching out information you don't think is widely disseminated or carefully scrutinized. To have a shot, you've got to have a good handle on the basics of this industry. To have a shot at outperforming everyone else, you've got to constantly keep an eye out and an ear to the ground. Find out what's selling, how the market is changing, what's historically worked (and what hasn't), &c, &c.
Remember, when it comes to book sales, you're competing for eyeballs and dollars. Why should someone pick up and purchase your book as opposed to someone else's? What knowledge or specialization do you have that might grant you an advantage? You can tell me you're authors and not businesspeople 'til, as my father says, the cows come home. That doesn't change the fact that by trying to make careers as writers you are, effectively, taking a shot at running a business. Do your research and do it well.
Both the stock market and the publishing industry react to new information. Neither system cares about old news. When doing your research, ensure that you're minimizing assumptions about what information hasn't yet been incorporated into the market. Chances are, you're not as ahead of the game as you might at first think. If you are ahead, however, you've got to be prepared to run with it.
Every event is an opportunity for someone. The stock of Company A is down? It's an opportunity for someone to buy at a discount. The stock of Company B is reaching new heights? It's an opportunity for someone to sell, make some cash, and reinvest it in another asset they find promising.
The same goes for publishing: the changes that have been rocking the industry for years are constantly producing opportunities. Borders went out of business; some independent stores are seeing growth as a result. The industry is transitioning over to a digital format for a substantial subset of its titles; some authors have found new audiences in the e-book format. And so on and so forth.
The point of all this is: as dissimilar as the worlds of the stock market and the publishing industry may at first seem, there are a lot of parallels. Publishing is a business. Research and a working understanding of the market are essential for success. Yes, your writing has to be good enough. Yes, you have to have a great story. But you also have to convince people to spend their hard-earned cash on that story.
Writing is half the battle; the other half is selling.***
*This isn't a real genre, but I really want it to be.
**This is more an example of the news cycle-related publishing hit, as mentioned in the previous example. But I just couldn't help myself.
***I lied about the other half being lasers. I'm sorry.