I'm not sure if I want to use real people and companies or make up an entirely different world with different people, presidents, and companies than our real world. If I did the latter I would offer the possibility of other universes in the preface and then use completely fictitious people. My main characters are of course fictitious, but they will be going on a journey to uncover hidden secrets from our nation's past and even from the world's past, so I need to know if these secrets they uncover can be about real people and companies (written in our real world) or if it would be better to make up companies and similar secrets to satisfy the story(written in an alternate universe).
Friday, January 18, 2019
Thursday, January 17, 2019
Problem converting color from RGB to CMYK for print
I designed a poster in CorelDraw X5 for printing purposes. I was told by the Printshop guy to use colors only in CMYK. For the most part I did, I don't know why I missed it but I used one color in RGB. I liked this color so much that I've used it at many places. So, current situation is that some colors are in RGB and some are in CMYK. So, I want to convert all RGB to CMYK and thought the problem would be solved. But now I'm actually facing a lot of trouble. The colors are not at all same. I hate the colors that it is showing me.
This is the color I used in RGB:

When I changed the "Model" to CMYK, the color it shows is really different. As you can see in the picture below, it's too dull:

The RGB values of both colors are not the same. What can I do to get the same color in CMYK? I did a little bit of reading here and there. They say, that you can't get same. In that case, what is the closest color that I can get?
Answer
The range of colors that can be reproduced in any CMYK-only color (known in the trade as "Process Color") printing method is considerably smaller than the sRGB range of colors reproducible on a standard monitor. Here is an excellent video that demonstrates this visually using 3D color models.
It happens that one of the ranges of RGB color that can't be reproduced at all is in the relatively "pure" and saturated blues, and you've run into a problem that confronts many a beginning or untrained designer: "everybody's favorite color is blue," but blue doesn't print. This is not the only difficult range. Huge chunks of green and yellow-green, and all the bright reds and oranges just don't appear in CMYK at all. (There are ways to get many of these colors into print, but you have to go beyond just CMY and K into special inks to get there.)
I'm not familiar with Corel, so I don't know if it has a "gamut warning" feature similar to what you'd find in Photoshop or Illustrator to let you know that you're picking colors that are outside the range of CMYK "process colors". What I can tell you is that in this case Corel is trying to give you the closest achievable CMYK blue to the one you picked in RGB. Unfortunately, as you've discovered, it's not very close.
The other thing that may help is to make sure that your CMYK color profile is not set to the usual default of SWOP v2. Not only is this very out of date, it doesn't accurately reflect what is really achievable on modern presses. The best CMYK color space for most purposes these days is Coated GRACol 2006, which is also an ISO standard. If you can change your CMYK color profile to GRACol or FOGRA39 you'll find you have considerably better choices in the blue range. They're still nowhere near the full RGB gamut, but a definite advance on SWOP.
structure - Preventing genre-savvy second-guessing in murder mysteries
In a murder mystery, most of the story is generally focused on figuring out who the murderer is; in "Fair-Play" mysteries, it's assumed the murderer is a significant character in the book, and the fun is in figuring out which of them it is.
This being the case, readers familiar with the format generally try to second-guess the investigation. That is, not only do they try to solve the case along with the sleuth and the unfolding information within the story (which is fine, that's something I want); their guesses are often based upon their knowledge of the structure and conventions of mystery stories - along the lines of "Mr. X can't be the murderer, because he's the first guy the detective suspects," or "It's got to be Little Miss Innocuous, because she's being portrayed as being innocent and trustworthy - so she's the one the author doesn't want us to suspect!".
Now, plenty of mysteries can withstand this sort of meta-interrogation, and some intentionally subvert these conventions. But I'm interested in avoiding this reaction altogether, or at least minimizing it - I want my readers' wits engaged in a duel with the mystery, not with genre-savvy one-upmanship.
How can this problem be addressed - how can I maintain suspense and suspicion towards a wide range of suspects, and encourage the reader not to second-guess the story?
(Note that I'm not looking for suggestions which will surprise the reader despite his genre-savvy. I'm looking for suggestions which will keep him from relying overwhelmingly on genre-savvy to begin with.)
quant trading strategies - Is there a non-recursive way of calculating the exponential moving average?
I want to calculate the exponential moving average for many stocks in a large investable universe. To do this, I've seen the following formula:

Because it references the previous day's exponential moving average, it seems to me like I would need to calculate the exponential moving average for every day going back to the security's inception in order to get an accurate ema for today. This seems like it would require too many computations to be used effectively. Is there a way to calculate an accurate ema that is less computationally heavy?
Answer
I've been waiting for someone to ask this question since every published method with which I am familiar propose weights which converge to $1$ only when the numbers of terms goes to infininity. This is quite annoying as it either requires we use a biased estimate which underestimates the true exponentially weighted mean or use back-dated information to parameter-ize the initial value.
Suppose you have weighting factors in which lagged weights are a factor of $\beta$, where:
$$\beta= e^{\frac{-\Delta t}{\tau}}$$
(note: $\beta[t]$ is the canonical weighting vector of an exponential moving average)
To come up weights, we want to find a series such that:
$${\Sigma}_{t=0}^{T=N}( \frac{\beta^{T-t}}{\Sigma\beta^{\Delta t}}) = 1$$
The sum of the raw exponential weights can be found through a series expansion:
$$\Sigma_{t=0}^{T=N} \beta^{\Delta t} = \frac{1-\beta^T}{1-\beta}$$
Therefore, periodic weights, $\omega_i$ can found as follows:
$$\omega_i = {\Sigma}_{t=0}^{T=N}\frac{\beta^{T-t}(1-\beta)}{1-\beta^T}$$.
If we have a vector of values:
$$X_i = [X_1,\, X_2, \, ...X_N]$$
and a vector of weights:
$$\omega_i = [\omega_1,\, \omega_2, \, ...\omega_N]$$
the dot-product of the two vectors will provide an unbiased estimate of the exponentially weighted average where the sum of weights always equal $1$ and where no out-of-sample terms are required to parameterize the initial value. The recursion is limited only to a finite series the same size as the data to be weighted.
$$\text{EWMA} = f(\omega_i \cdot X_i)= \Sigma (\omega_i * X_i)$$
Please let me if/how this works for you.
images - How to remove background with Gimp?
How to remove background from an image with Gimp?
Answer
There are several ways, like always, like in Adobe Photoshop or the like. One that comes to mind that used to work: use magic wand to select the background (and interior parts if you want them to go away) , do whilst shift pressed to add more areas, hit ctrl+i to invert selection, and without deselecting (so it gets placed in same area) hit ctrl+v. Then in layers window right click on that strange new layer created, and in the context menu that pops, select "new layer", it will be only the pixels you want and the rest is transparent. Now you'd delete the background layer (your original scan)
word choice - When Choosing Labels/titles for Characters instead of their names
This is probably a repeat of a previous question, but I have a slightly different problem when writing. I don't always want to refer to characters by their names (if I do, then I run into problems with people needing to remember a long list of characters and names), so I want to pick some other trait, say "the old" or the young (insert whatever), but it gets to be repetitive using those terms to describe them. At the same time I both like the repetition (to avoid moments of "who is this character?") but it can also be limiting too. Almost to the the point of people wondering if I need to brush up on my vocabulary skills.
My friend brought up the concern of it being too repetitive to keep using a limited few words to describe an unnamed character. (eventually his name does come to the story), but at the time of his first appearance he's in a flashback of another character who knows him well enough to not be using his name in a sentence.
Things I'm trying to avoid:
Using the character's name in dialogue (it just doesn't feel natural in a one on one conversation.)
Too much repetition. He's elderly, old, frail. He's the commander of my fictitious army. We got that, but to keep using the same choice of words to describe him, is that appropriate? Would it bore readers?
Blurting out his name before it fits the context. Most likely "sir" is the word you'll hear my character refer to him as, unless it is an informal meeting. Even if that happens, it feels more natural to not be calling him out by name.
My main fear is if I deviate too much it will be "who is this character?" or where did "his friend" come from when trying to come up with alternative titles to break up the repetition.
One choice is to just "tell" rather than show and have the narrator just give the names of the characters as soon as the flashback appears, but I feel that kind of loses something.
Another thing to consider the scene involving this unnamed character is written in 3rd person narration. The narrator writes in 1st person with scenes that involve him, but when he's seeing scenes involving other characters, the style switches to 3rd person.
That said, what are your thoughts? How do you handle characters without names, or those with names the story isn't ready to reveal yet? Do you stick to a few labels for each character and keep referring to them by those titles, or come up with as many as possible?
Answer
I write in third person limited, meaning my narrator knows the thoughts and feelings of only one character in the book (the hero). Everybody is still referred to as "he", "she", "they", etc, (never "I"), but the narrator does not reveal anything the hero does not plausibly know or see.
My latest hero often encounters strangers on her quest and interacts with them, without names.
My solution for the narration is to temporarily pick some unique characteristic she (and the narrator) uses to refer to them, but if they use a name in conversation (as people do) start using the name.
IRL, you learn the names of your friends, enemies, coworkers and store clerks eventually, somehow. Once I know a character is going to be important later, I typically "engineer" one of these ways into a first encounter. In this segment, my female hero is seeking passage on a primitive down river barge:
As she approached the next station, she saw just the type of barge she was looking for: No animals, and the cargo looked like simple lumber and some barrels. A man in his forties was tilting barrels, apparently heavy with something, and rolling them toward the pilot house.
"Sir?" she called, still walking toward him. He stopped and looked up, squinting, waiting for her to get closer.
"Do you take passengers?" Alice asked. "I aim to get to Corktown."
The barrel-man turned and called to the pilot house. "Brady! Yo! Do you want a passenger?" He turned back to Alice who had reached the end of the barge. "Give him a minute," he said, and began rolling his barrel again.
When Brady emerges, he is called by name. Note that if I had put Brady on the barge rolling barrels, it would have been a bit more awkward for Alice to learn his name, since (as in real life) they likely would conclude their transaction first without names. I would introduce "barrel man" as an 'extra' doing some labor for Brady that we don't really need to see again. Without the barrel man, It would need to be a more explicit exchange. Say after a price was agreed:
"Done then," he said, pocketing the cash. "What's your name?"
"Alice."
"Alice," he repeated, and pointed at himself. "Brady. I leave at noon, with or without you."
Like names, "barrel man" here would not be used every time, just about as often as I use any other name. That IS his name in Alice's mind. Likewise in another situation, speaking to three clerks, she might use "bald clerk", "tall clerk" and "young clerk". Some salient detail she has plausibly noticed that would separate the people for the reader. If a name is learned, it is used thereafter:
The bald clerk rolled his eyes, and addressed the young clerk. "David? Would you please shut up?"
David was going to respond, but seeing the stern look in the bald clerk's eyes, clamped his mouth shut.
If the "barrel man" above reappears later, but is not important enough to name, he remains "barrel man", whether barrels are present or not.
But eventually, like in real life, your character(s) need to learn the names of other characters. I favor indirect approaches like above, Brady and David can be important later in the story. Or callouts:
"See that guy? Red tie? Sam Philbin, the weather guy."
Or introductions:
"Alice, this is Jerry, the runner I told you about."
Whatever real-life tricks you can imagine. As a last resort, in real life, we can resort to direct query:
"Hi, I'm Alice," she said, extending a hand.
The boy took it. "Griffy," he said, "It's Griffin really, after my grandfather, but everyone calls me Griffy. Except my mother. And my sister, she thinks my name is 'dumbass'."
For myself, I would not refer to any character by a label or title for more than a single scene (which may be a whole chapter). If I were referring to them for two or more scenes, I engineer some way for my hero to learn their name, preferably indirectly. For dramatic effect, I often use direct introduction for "important" characters that will be an ongoing presence. Of course for friends and family, I do the opposite of the above from the heroes POV: The hero uses the name mentally, but the reader has to learn their role. So
Her mother shouted from the kitchen. "Bill? Where are you?"
Her father shouted from the garage, not in anger but for volume, "I'm busy!"
Somehow or another we have all learned the names of hundreds of people. Try to employ in writing all the ways that can happen in real life.
He walked into the office, there was only one blonde woman at the desks, so he approached her.
"Hi, are you Alice?"
"Yes," she said, still reading her computer screen, then looked to him. "How can I help you?"
"I'm David, from engineering. I was told you handle ordering for machine parts?"
You can find thousands of name suggestions online, particularly looking for baby names. Personally I try to avoid duplicates and keep a list in alphabetic order for characters in the story. If I need new characters, I look for a first letter I haven't used before, at least for that gender. If I don't like any of them, I will reuse a letter, but make sure the names read and sound distinct enough for the reader to keep them straight. Not "Billy" and "Bailey", maybe "Billy" and "Brad", or "Burke".
Earnings and valuation data sources online
Are there any free/cheap sources for historical data on company earnings and valuations? I can get historical price data from Google and Yahoo, and it looks like I can get about five years of historical balance sheet data from Google using quantmod in R. Are there any longer-term sources of for these kind of data?
Bonus points for R packages or code examples.
Answer
If you don't mind parsing some html, AdvFN has fundamental data on US companies as far back as 1994.
technique - How credible is wikipedia?
I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...
-
I've been tasked with drafting the text for a memorial plaque dedicated to group X. Group X was big, diverse, and had several hundred ye...
-
If all fields in a form are required should they be marked somehow (eg. with an asterisk)? I see this done a lot and find it redundant? Ther...
-
I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...